From 10ad9e5099cd4454f73ca9d67012654a2e2787ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ertu=C4=9Frulcan=20Bakas?= Date: Wed, 11 Sep 2024 13:33:46 +0300 Subject: [PATCH] fix(ContractService): isLoading fix --- .../contracts/contracts/new-contract/page.tsx | 174 +++++++++--------- .../app/[type]/contracts/contracts/page.tsx | 3 +- packages/ayasofyazilim-ui | 2 +- 3 files changed, 91 insertions(+), 88 deletions(-) diff --git a/apps/web/src/app/[lang]/app/[type]/contracts/contracts/new-contract/page.tsx b/apps/web/src/app/[lang]/app/[type]/contracts/contracts/new-contract/page.tsx index 964d996ae..31d6a62d6 100644 --- a/apps/web/src/app/[lang]/app/[type]/contracts/contracts/new-contract/page.tsx +++ b/apps/web/src/app/[lang]/app/[type]/contracts/contracts/new-contract/page.tsx @@ -1,14 +1,8 @@ "use client"; import { Button } from "@/components/ui/button"; -import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from "@/components/ui/card"; +import { Card } from "@/components/ui/card"; import { Label } from "@/components/ui/label"; -import Image from "next/image"; +import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; import { Select, SelectContent, @@ -16,10 +10,6 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { - EmptyCard, - FileUploader, -} from "@repo/ayasofyazilim-ui/molecules/file-uploader"; import { toast } from "@/components/ui/sonner"; import { cn } from "@/lib/utils"; import type { @@ -38,23 +28,27 @@ import { $UniRefund_CRMService_Organizations_OrganizationDto as OrganizationSchema, } from "@ayasofyazilim/saas/CRMService"; import { createZodObject } from "@repo/ayasofyazilim-ui/lib/create-zod-object"; +import { + EmptyCard, + FileUploader, +} from "@repo/ayasofyazilim-ui/molecules/file-uploader"; +import { PageHeader } from "@repo/ayasofyazilim-ui/molecules/page-header"; import AutoForm from "@repo/ayasofyazilim-ui/organisms/auto-form"; import Stepper, { StepperContent, } from "@repo/ayasofyazilim-ui/organisms/stepper"; -import { useEffect, useState } from "react"; +import Image from "next/image"; import { useRouter } from "next/navigation"; -import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; -import { PageHeader } from "@repo/ayasofyazilim-ui/molecules/page-header"; -import { getBaseLink } from "src/utils"; -import { useLocale } from "src/providers/locale"; +import { useEffect, useState } from "react"; import type { ContractServiceResource } from "src/language-data/ContractService"; import { getResourceDataClient } from "src/language-data/ContractService"; -import { postContractsContractHeaders } from "../../actions/contracts"; +import { useLocale } from "src/providers/locale"; +import { getBaseLink } from "src/utils"; import { getCrmServiceMerchants, getCrmServiceMerchantsDetailById, } from "../../../crm/actions/merchant"; +import { postContractsContractHeaders } from "../../actions/contracts"; function createReadonlyFieldConfig( elements: string[], @@ -154,7 +148,7 @@ export default function Page({ params }: { params: { lang: string } }) { description={languageData["Contracts.Create.Description"]} title={languageData["Contracts.Create.Title"]} /> - + @@ -196,7 +190,7 @@ export default function Page({ params }: { params: { lang: string } }) { @@ -217,6 +211,7 @@ export default function Page({ params }: { params: { lang: string } }) {