summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-11-24 10:26:06 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-11-24 10:26:06 +0700
commitdc9b1b4dd2b7a1062ed3ceb48be3bbafd4d53fb4 (patch)
tree20bf17b25cf1c82f5c8c214bb237437c3bf3e733
parentc9fd0d8efac02dfc50cd69c0085bc12af45f453a (diff)
Move @prisma/client import to prisma/generated/client
-rw-r--r--.gitignore4
-rw-r--r--prisma/client.ts2
-rw-r--r--src/app/api/product/route.tsx2
-rw-r--r--src/app/api/stock-opname/export/route.tsx2
-rw-r--r--src/app/api/stock-opname/location/route.tsx2
-rw-r--r--src/app/api/stock-opname/route.tsx2
-rw-r--r--src/common/stores/useStockOpnameStore.ts2
-rw-r--r--src/common/types/auth.ts2
-rw-r--r--src/common/types/stockOpname.ts2
-rw-r--r--src/common/types/team.ts2
-rw-r--r--src/modules/result/components/DetailRow.tsx2
-rw-r--r--src/modules/result/components/Filter.tsx2
-rw-r--r--src/modules/result/components/ProductModal.tsx2
-rw-r--r--src/modules/stock-opname/index.tsx2
14 files changed, 16 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 6abf28c..84e16cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,4 +37,6 @@ next-env.d.ts
sw.*
workbox-*
-swe-worker-* \ No newline at end of file
+swe-worker-*
+
+prisma/generated \ No newline at end of file
diff --git a/prisma/client.ts b/prisma/client.ts
index 16df655..13aaf68 100644
--- a/prisma/client.ts
+++ b/prisma/client.ts
@@ -1,4 +1,4 @@
-import { PrismaClient } from "@prisma/client";
+import { PrismaClient } from "prisma/generated/client";
const prismaClientSingleton = () => {
return new PrismaClient();
diff --git a/src/app/api/product/route.tsx b/src/app/api/product/route.tsx
index 1a28315..63813aa 100644
--- a/src/app/api/product/route.tsx
+++ b/src/app/api/product/route.tsx
@@ -1,7 +1,7 @@
import getServerCredential from "@/common/libs/getServerCredential";
-import { Prisma } from "@prisma/client";
import { NextRequest, NextResponse } from "next/server";
import { prisma } from "prisma/client";
+import { Prisma } from "prisma/generated/client";
export async function GET(request: NextRequest) {
const PAGE_SIZE = 30;
diff --git a/src/app/api/stock-opname/export/route.tsx b/src/app/api/stock-opname/export/route.tsx
index 27f99fe..650ceba 100644
--- a/src/app/api/stock-opname/export/route.tsx
+++ b/src/app/api/stock-opname/export/route.tsx
@@ -1,5 +1,5 @@
import { StockOpnameLocationRes } from "@/common/types/stockOpname";
-import { Product } from "@prisma/client";
+import { Product } from "prisma/generated/client";
import { NextRequest, NextResponse } from "next/server";
import { prisma } from "prisma/client";
import * as XLSX from "xlsx"
diff --git a/src/app/api/stock-opname/location/route.tsx b/src/app/api/stock-opname/location/route.tsx
index e6c20ec..f7576cc 100644
--- a/src/app/api/stock-opname/location/route.tsx
+++ b/src/app/api/stock-opname/location/route.tsx
@@ -1,5 +1,5 @@
import { DetailTeam, StockOpnameLocationRes } from "@/common/types/stockOpname";
-import { Team } from "@prisma/client";
+import { Team } from "prisma/generated/client";
import { NextRequest, NextResponse } from "next/server";
import { prisma } from "prisma/client";
diff --git a/src/app/api/stock-opname/route.tsx b/src/app/api/stock-opname/route.tsx
index ba54524..3b3ad5a 100644
--- a/src/app/api/stock-opname/route.tsx
+++ b/src/app/api/stock-opname/route.tsx
@@ -1,5 +1,5 @@
import { StockOpnameLocationRes, StockOpnameRequest } from "@/common/types/stockOpname";
-import { Prisma, Team } from "@prisma/client";
+import { Prisma, Team } from "prisma/generated/client";
import { NextRequest, NextResponse } from "next/server";
import { prisma } from "prisma/client";
import _ from "lodash"
diff --git a/src/common/stores/useStockOpnameStore.ts b/src/common/stores/useStockOpnameStore.ts
index 8aeff77..0404611 100644
--- a/src/common/stores/useStockOpnameStore.ts
+++ b/src/common/stores/useStockOpnameStore.ts
@@ -1,7 +1,7 @@
import { create } from "zustand";
import { SelectOption } from "../types/select";
import { SingleValue } from "react-select";
-import { User } from "@prisma/client";
+import { User } from "prisma/generated/client";
type State = {
form: {
diff --git a/src/common/types/auth.ts b/src/common/types/auth.ts
index 50d176f..ecda60c 100644
--- a/src/common/types/auth.ts
+++ b/src/common/types/auth.ts
@@ -1,4 +1,4 @@
-import { Company, User } from "@prisma/client";
+import { Company, User } from "prisma/generated/client";
export type Credential = User & {
company: Company;
diff --git a/src/common/types/stockOpname.ts b/src/common/types/stockOpname.ts
index 762722a..0eea0c5 100644
--- a/src/common/types/stockOpname.ts
+++ b/src/common/types/stockOpname.ts
@@ -1,4 +1,4 @@
-import { Location, Team, User } from "@prisma/client";
+import { Location, Team, User } from "prisma/generated/client";
export type DetailTeam = {
[key in keyof typeof Team]: {
diff --git a/src/common/types/team.ts b/src/common/types/team.ts
index 0989337..768c774 100644
--- a/src/common/types/team.ts
+++ b/src/common/types/team.ts
@@ -1,4 +1,4 @@
-import { Team } from "@prisma/client";
+import { Team } from "prisma/generated/client";
export type TeamAliases = {
[key in keyof typeof Team]: {
diff --git a/src/modules/result/components/DetailRow.tsx b/src/modules/result/components/DetailRow.tsx
index ff76785..18dcb8f 100644
--- a/src/modules/result/components/DetailRow.tsx
+++ b/src/modules/result/components/DetailRow.tsx
@@ -5,7 +5,7 @@ import { Skeleton } from '@nextui-org/react';
import { useQuery } from '@tanstack/react-query'
import styles from './table.module.css'
import { CornerDownRightIcon } from 'lucide-react';
-import { User } from '@prisma/client';
+import { User } from 'prisma/generated/client';
import clsxm from '@/common/libs/clsxm';
import getClientCredential from '@/common/libs/getClientCredential';
diff --git a/src/modules/result/components/Filter.tsx b/src/modules/result/components/Filter.tsx
index 511b91c..52fa215 100644
--- a/src/modules/result/components/Filter.tsx
+++ b/src/modules/result/components/Filter.tsx
@@ -1,6 +1,6 @@
"use client";
import { Input, Select, SelectItem } from "@nextui-org/react"
-import { Company } from "@prisma/client"
+import { Company } from "prisma/generated/client"
import { useEffect } from "react"
import { SelectOption } from "@/common/types/select"
import { useResultStore } from "@/common/stores/useResultStore";
diff --git a/src/modules/result/components/ProductModal.tsx b/src/modules/result/components/ProductModal.tsx
index 001c946..1fe4130 100644
--- a/src/modules/result/components/ProductModal.tsx
+++ b/src/modules/result/components/ProductModal.tsx
@@ -1,6 +1,6 @@
import { useResultStore } from '@/common/stores/useResultStore'
import { Input, Modal, ModalBody, ModalContent, ModalHeader, Pagination, Skeleton, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '@nextui-org/react'
-import { Product } from '@prisma/client'
+import { Product } from 'prisma/generated/client'
import { useQuery } from '@tanstack/react-query'
import React, { useEffect, useMemo, useState } from 'react'
import { useDebounce } from 'usehooks-ts'
diff --git a/src/modules/stock-opname/index.tsx b/src/modules/stock-opname/index.tsx
index c2a889a..2f1c210 100644
--- a/src/modules/stock-opname/index.tsx
+++ b/src/modules/stock-opname/index.tsx
@@ -1,5 +1,5 @@
"use client";
-import { Location, Product } from "@prisma/client";
+import { Location, Product } from "prisma/generated/client";
import AsyncSelect from "react-select/async"
import styles from "./stock-opname.module.css"
import { Button, Card, CardBody, Input, Modal, ModalBody, ModalContent, ModalHeader, Spacer, Spinner } from "@nextui-org/react";