fix
Desc: - Perubahan pengambilan data dari API ke Function use server No issue
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
|
reactStrictMode: false,
|
||||||
experimental: {
|
experimental: {
|
||||||
serverActions: true
|
serverActions: true
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = nextConfig
|
module.exports = nextConfig
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-simple-toasts": "^5.10.0",
|
"react-simple-toasts": "^5.10.0",
|
||||||
|
"react-toastify": "^9.1.3",
|
||||||
|
"socket.io-client": "^4.7.2",
|
||||||
"tailwindcss": "3.3.3",
|
"tailwindcss": "3.3.3",
|
||||||
"typescript": "5.1.6",
|
"typescript": "5.1.6",
|
||||||
"uuid": "^9.0.1",
|
"uuid": "^9.0.1",
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ model Katalog {
|
|||||||
namaBisnis String
|
namaBisnis String
|
||||||
alamatKantor String
|
alamatKantor String
|
||||||
tlpn String
|
tlpn String
|
||||||
deskripssi String
|
deskripsi String
|
||||||
active Boolean @default(true)
|
active Boolean @default(true)
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @default(now()) @updatedAt
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
|||||||
BIN
public/img/2ba722df-abd3-4b3a-b087-fc9f61b077ae.png
Normal file
BIN
public/img/2ba722df-abd3-4b3a-b087-fc9f61b077ae.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
@@ -1,24 +0,0 @@
|
|||||||
import { myConsole } from "@/app/fun/my_console";
|
|
||||||
import prisma from "@/app/lib/prisma";
|
|
||||||
import { NextResponse } from "next/server";
|
|
||||||
|
|
||||||
export async function POST(req: Request) {
|
|
||||||
if (req.method === "POST") {
|
|
||||||
const body = await req.json();
|
|
||||||
// myConsole(body);
|
|
||||||
|
|
||||||
const data = await prisma.katalog.create({
|
|
||||||
data: {
|
|
||||||
profileId: body.profileId,
|
|
||||||
namaBisnis: body.namaBisnis,
|
|
||||||
alamatKantor: body.alamatKantor,
|
|
||||||
tlpn: body.tlpn,
|
|
||||||
deskripssi: body.deskripssi,
|
|
||||||
masterBidangBisnisId: body.masterBidangBisnisId,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return NextResponse.json({ status: 201, success: true });
|
|
||||||
}
|
|
||||||
return NextResponse.json({ success: false });
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import { myConsole } from "@/app/fun/my_console";
|
|
||||||
import prisma from "@/app/lib/prisma";
|
|
||||||
import { NextResponse } from "next/server";
|
|
||||||
|
|
||||||
export async function POST(req: Request) {
|
|
||||||
if (req.method === "POST") {
|
|
||||||
const body = await req.json();
|
|
||||||
// myConsole(body);
|
|
||||||
|
|
||||||
const data = await prisma.profile.create({
|
|
||||||
data: {
|
|
||||||
userId: body.userId,
|
|
||||||
name: body.name,
|
|
||||||
email: body.email,
|
|
||||||
alamat: body.alamat,
|
|
||||||
jenisKelamin: body.jenisKelamin,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
if (data) return NextResponse.json({ status: 201 });
|
|
||||||
|
|
||||||
return NextResponse.json({ success: true });
|
|
||||||
}
|
|
||||||
return NextResponse.json({ success: false });
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
import { myConsole } from "@/app/fun/my_console";
|
|
||||||
import prisma from "@/app/lib/prisma";
|
|
||||||
import { NextResponse } from "next/server";
|
|
||||||
|
|
||||||
export async function POST(req: Request) {
|
|
||||||
if (req.method === "POST") {
|
|
||||||
const body = await req.json();
|
|
||||||
// myConsole(body);
|
|
||||||
|
|
||||||
const data = await prisma.profile.update({
|
|
||||||
where: {
|
|
||||||
id: body.id
|
|
||||||
},
|
|
||||||
data: {
|
|
||||||
name: body.name,
|
|
||||||
email: body.email,
|
|
||||||
alamat: body.alamat,
|
|
||||||
jenisKelamin: body.jenisKelamin
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if(data) {
|
|
||||||
return NextResponse.json({status: 200})
|
|
||||||
} else {
|
|
||||||
return new Response("Error",{ status :401 });
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return NextResponse.json({ success: true });
|
|
||||||
}
|
|
||||||
return NextResponse.json({ success: false });
|
|
||||||
}
|
|
||||||
@@ -6,6 +6,7 @@ import { redirect } from "next/navigation";
|
|||||||
|
|
||||||
import yaml from "yaml";
|
import yaml from "yaml";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
@@ -18,9 +19,13 @@ export default async function Page() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const dataProfile = await funGetUserProfile(usr.id)
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<HomeView user={usr} />
|
{/* {JSON.stringify(usr)} */}
|
||||||
|
<HomeView user={dataProfile as any} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/app/dev/katalog/[id]/layout.tsx
Normal file
10
src/app/dev/katalog/[id]/layout.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { KatalogLayout } from "@/app_modules/katalog/main";
|
||||||
|
|
||||||
|
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||||
|
// const a = atob(params.id.toString())
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<KatalogLayout profileId={params.id}>{children}</KatalogLayout>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { KatalogLayout } from "@/app_modules/katalog/main";
|
|
||||||
|
|
||||||
export default async function Layout({ children }: { children: any }) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<KatalogLayout>{children}</KatalogLayout>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
8
src/app/dev/portofolio/create/[id]/layout.tsx
Normal file
8
src/app/dev/portofolio/create/[id]/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { CreatePortofolio, CreatePortofolioLayout, PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
|
||||||
|
return<>
|
||||||
|
<CreatePortofolioLayout profileId={params.id}>{children}</CreatePortofolioLayout>
|
||||||
|
</>
|
||||||
|
}
|
||||||
16
src/app/dev/portofolio/create/[id]/page.tsx
Normal file
16
src/app/dev/portofolio/create/[id]/page.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { myConsole } from "@/app/fun/my_console";
|
||||||
|
import { CreatePortofolio } from "@/app_modules/katalog/portofolio";
|
||||||
|
import { getBidangBisnis } from "@/app_modules/katalog/portofolio/fun/get_bidang_bisnis";
|
||||||
|
|
||||||
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
const bidangBisnis = await getBidangBisnis();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<CreatePortofolio
|
||||||
|
bidangBisnis={bidangBisnis as any}
|
||||||
|
profileId={params.id}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
|
||||||
return<>
|
|
||||||
<PortofolioLayout>{children}</PortofolioLayout>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import { myConsole } from "@/app/fun/my_console";
|
|
||||||
import { CreatePortofolio } from "@/app_modules/katalog/portofolio";
|
|
||||||
import { getBidangBisnis } from "@/app_modules/katalog/portofolio/fun/get_bidang_bisnis";
|
|
||||||
import { getProfile } from "@/app_modules/katalog/profile";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
const bidangBisnis = await getBidangBisnis()
|
|
||||||
const id = await getProfile();
|
|
||||||
const profileId = id?.id;
|
|
||||||
// console.log(bidangBisnis)
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<CreatePortofolio bidangBisnis={bidangBisnis as any} profileId={profileId} />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
import { PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
import { PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
||||||
|
import { getOnePortofolio } from "@/app_modules/katalog/portofolio/fun/get_one_portofolio";
|
||||||
|
|
||||||
|
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||||
|
const getPorto = await getOnePortofolio(params.id)
|
||||||
|
|
||||||
|
|
||||||
export default async function Layout({ children }: { children: any }) {
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PortofolioLayout>{children}</PortofolioLayout>
|
<PortofolioLayout profileId={getPorto?.profileId}>{children}</PortofolioLayout>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,3 +7,4 @@ export default function Layout({ children }: { children: any }) {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
9
src/app/dev/profile/create/[id]/page.tsx
Normal file
9
src/app/dev/profile/create/[id]/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { CreateProfile } from "@/app_modules/katalog/profile";
|
||||||
|
|
||||||
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
|
// console.log(params.id)
|
||||||
|
|
||||||
|
return <>
|
||||||
|
<CreateProfile userId={params.id}/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { CreateProfile } from "@/app_modules/katalog/profile";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return <>
|
|
||||||
<CreateProfile/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
12
src/app/dev/profile/edit/[id]/layout.tsx
Normal file
12
src/app/dev/profile/edit/[id]/layout.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
||||||
|
import { EditProfileLayout } from "@/app_modules/katalog/profile";
|
||||||
|
|
||||||
|
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||||
|
const data = await funGetUserProfile(params.id)
|
||||||
|
const profileId = data?.Profile?.id
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<EditProfileLayout profileId={profileId}>{children}</EditProfileLayout>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
14
src/app/dev/profile/edit/[id]/page.tsx
Normal file
14
src/app/dev/profile/edit/[id]/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
||||||
|
import { getProfile } from "@/app_modules/katalog/profile";
|
||||||
|
import EditProfile from "@/app_modules/katalog/profile/edit/view";
|
||||||
|
|
||||||
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
const data = await funGetUserProfile(params.id);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{/* {JSON.stringify(data)} */}
|
||||||
|
<EditProfile data={data as any} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { EditProfileLayout } from "@/app_modules/katalog/profile";
|
|
||||||
|
|
||||||
export default function Layout({ children }: { children: any }) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<EditProfileLayout>{children}</EditProfileLayout>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import { getProfile } from "@/app_modules/katalog/profile";
|
|
||||||
import EditProfile from "@/app_modules/katalog/profile/edit/view";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
const data = await getProfile();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* {JSON.stringify(data)} */}
|
|
||||||
<EditProfile data={data} />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
13
src/app/dev/profile/upload/[id]/layout.tsx
Normal file
13
src/app/dev/profile/upload/[id]/layout.tsx
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile";
|
||||||
|
import { AppShell } from "@mantine/core";
|
||||||
|
|
||||||
|
export default function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
|
||||||
|
<UploadFotoProfileLayout profileId={params.id}>{children}</UploadFotoProfileLayout>
|
||||||
|
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -6,23 +6,20 @@ import fs from "fs";
|
|||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||||
|
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const c = cookies().get("ssn")
|
const c = cookies().get("ssn");
|
||||||
const usr = JSON.parse(
|
const usr = JSON.parse(
|
||||||
await unsealData(c?.value as string, {
|
await unsealData(c?.value as string, {
|
||||||
password: config.server.password,
|
password: config.server.password,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(usr)
|
const imageUrl = await funGetUserProfile(usr.id).then(
|
||||||
|
(res) => res?.Profile?.ImageProfile?.url
|
||||||
const imageUrl = await funGetUserProfile(usr.id).then((res) => res?.Profile?.ImageProfile?.url)
|
);
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
||||||
<UploadFotoProfile imageUrl={imageUrl} />
|
<UploadFotoProfile imageUrl={imageUrl} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
|
|
||||||
export default function Layout({ children }: { children: any }) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<UploadFotoProfileLayout>{children}</UploadFotoProfileLayout>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,31 +1,40 @@
|
|||||||
'use client';
|
"use client";
|
||||||
|
import AppNotif from "@/app_modules/notif";
|
||||||
// import './globals.css'
|
// import './globals.css'
|
||||||
import { CacheProvider } from '@emotion/react';
|
import { CacheProvider } from "@emotion/react";
|
||||||
import { MantineProvider, useEmotionCache } from '@mantine/core';
|
import { MantineProvider, useEmotionCache } from "@mantine/core";
|
||||||
import { useServerInsertedHTML } from 'next/navigation';
|
import { useServerInsertedHTML } from "next/navigation";
|
||||||
|
import { ToastContainer, toast } from "react-toastify";
|
||||||
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
|
|
||||||
export default function RootStyleRegistry({ children }: { children: React.ReactNode }) {
|
export default function RootStyleRegistry({
|
||||||
const cache = useEmotionCache();
|
children,
|
||||||
cache.compat = true;
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
const cache = useEmotionCache();
|
||||||
|
cache.compat = true;
|
||||||
|
|
||||||
useServerInsertedHTML(() => (
|
useServerInsertedHTML(() => (
|
||||||
<style
|
<style
|
||||||
data-emotion={`${cache.key} ${Object.keys(cache.inserted).join(' ')}`}
|
data-emotion={`${cache.key} ${Object.keys(cache.inserted).join(" ")}`}
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: Object.values(cache.inserted).join(' '),
|
__html: Object.values(cache.inserted).join(" "),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang='en' data-theme="light" >
|
<html lang="en" data-theme="light">
|
||||||
<body suppressHydrationWarning={true} >
|
<body suppressHydrationWarning={true}>
|
||||||
<CacheProvider value={cache}>
|
<CacheProvider value={cache}>
|
||||||
<MantineProvider withGlobalStyles withNormalizeCSS>
|
<MantineProvider withGlobalStyles withNormalizeCSS>
|
||||||
{children}
|
{children}
|
||||||
</MantineProvider>
|
<ToastContainer position="bottom-center" />
|
||||||
</CacheProvider>
|
<AppNotif />
|
||||||
</body>
|
</MantineProvider>
|
||||||
</html>
|
</CacheProvider>
|
||||||
);
|
</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { myConsole } from "@/app/fun/my_console";
|
|||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
import { ApiHipmi } from "@/app/lib/api";
|
import { ApiHipmi } from "@/app/lib/api";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
export default function Register() {
|
export default function Register() {
|
||||||
const route = useRouter();
|
const route = useRouter();
|
||||||
@@ -20,7 +21,7 @@ export default function Register() {
|
|||||||
myConsole(value);
|
myConsole(value);
|
||||||
|
|
||||||
const body = {
|
const body = {
|
||||||
username: value,
|
username: _.lowerCase(value),
|
||||||
nomor: nomor,
|
nomor: nomor,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import { myConsole } from "@/app/fun/my_console";
|
|||||||
import { getFotoProfile } from "../katalog/profile/api/get-foto-profile";
|
import { getFotoProfile } from "../katalog/profile/api/get-foto-profile";
|
||||||
import { funGetUserProfile } from "../fun/get_user_profile";
|
import { funGetUserProfile } from "../fun/get_user_profile";
|
||||||
import { USER_PROFILE } from "../models/user_profile";
|
import { USER_PROFILE } from "../models/user_profile";
|
||||||
|
import AppNotif from "../notif";
|
||||||
|
|
||||||
const listHalaman = [
|
const listHalaman = [
|
||||||
{
|
{
|
||||||
@@ -96,29 +97,8 @@ export default function HomeView({ user }: { user: USER_PROFILE }) {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [stateUser, setStateUser] = useState(user);
|
const [stateUser, setStateUser] = useState(user);
|
||||||
|
|
||||||
// const [token, setToken] = useAtom(gs_token);
|
|
||||||
// useShallowEffect(() => {
|
|
||||||
// getUserId();
|
|
||||||
// }, []);
|
|
||||||
// async function getUserId() {
|
|
||||||
// const get = await getToken();
|
|
||||||
// if (!get) return myConsole("Data Kosong");
|
|
||||||
// setToken(get);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const [profile, setProfile] = useAtom(gs_profile);
|
|
||||||
// useShallowEffect(() => {
|
|
||||||
// loadProfile();
|
|
||||||
// }, []);
|
|
||||||
// async function loadProfile() {
|
|
||||||
// const get = await getProfile();
|
|
||||||
// if (!get) return myConsole("Data Kosong");
|
|
||||||
// setProfile(get);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <Center><Image src={ApiHipmi.get_foto + foto ?? ""} alt="" height={100} width={100}/></Center> */}
|
|
||||||
<Box>
|
<Box>
|
||||||
<Flex align={"center"} gap={"sm"}>
|
<Flex align={"center"} gap={"sm"}>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
@@ -126,9 +106,9 @@ export default function HomeView({ user }: { user: USER_PROFILE }) {
|
|||||||
variant="transparent"
|
variant="transparent"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (stateUser.Profile === null) {
|
if (stateUser.Profile === null) {
|
||||||
return router.push("/dev/profile/create");
|
return router.push(`/dev/profile/create/${stateUser.id}`);
|
||||||
} else {
|
} else {
|
||||||
return router.push("/dev/katalog/view");
|
return router.push(`/dev/katalog/${stateUser.Profile.id}`);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
|||||||
import { IconUserSearch, IconAward, IconQrcode, IconArrowLeft, IconPencilPlus } from "@tabler/icons-react";
|
import { IconUserSearch, IconAward, IconQrcode, IconArrowLeft, IconPencilPlus } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function KatalogLayout({ children }: { children: any }) {
|
export default function KatalogLayout({ children, profileId }: { children: any, profileId: any }) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -25,7 +25,7 @@ export default function KatalogLayout({ children }: { children: any }) {
|
|||||||
Katalog
|
Katalog
|
||||||
</Text>
|
</Text>
|
||||||
<Group spacing={"sm"}>
|
<Group spacing={"sm"}>
|
||||||
<ActionIcon variant="transparent" onClick={() => router.push("/dev/portofolio/create")}>
|
<ActionIcon variant="transparent" onClick={() => router.push(`/dev/portofolio/create/${profileId}`)}>
|
||||||
<IconPencilPlus />
|
<IconPencilPlus />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
{/* <Logout /> */}
|
{/* <Logout /> */}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
|||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
import { IconArrowLeft } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function CreatePortofolioLayout({ children }: { children: any }) {
|
export default function CreatePortofolioLayout({ children, profileId }: { children: any, profileId: any }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -14,7 +14,7 @@ export default function CreatePortofolioLayout({ children }: { children: any })
|
|||||||
<Group position="apart" h={50}>
|
<Group position="apart" h={50}>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="transparent"
|
variant="transparent"
|
||||||
onClick={() => router.push("/dev/katalog/view")}
|
onClick={() => router.push(`/dev/katalog/${profileId}`)}
|
||||||
>
|
>
|
||||||
<IconArrowLeft />
|
<IconArrowLeft />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import _ from "lodash";
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
|
import funCreatePortofolio from "../fun/fun_create_portofolio";
|
||||||
|
|
||||||
export default function CreatePortofolio({
|
export default function CreatePortofolio({
|
||||||
bidangBisnis,
|
bidangBisnis,
|
||||||
@@ -23,7 +24,7 @@ export default function CreatePortofolio({
|
|||||||
bidangBisnisId: "",
|
bidangBisnisId: "",
|
||||||
alamatKantor: "",
|
alamatKantor: "",
|
||||||
tlpn: "",
|
tlpn: "",
|
||||||
deskripssi: "",
|
deskripsi: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
@@ -33,33 +34,24 @@ export default function CreatePortofolio({
|
|||||||
masterBidangBisnisId: value.bidangBisnisId,
|
masterBidangBisnisId: value.bidangBisnisId,
|
||||||
alamatKantor: value.alamatKantor,
|
alamatKantor: value.alamatKantor,
|
||||||
tlpn: value.tlpn,
|
tlpn: value.tlpn,
|
||||||
deskripssi: value.deskripssi,
|
deskripsi: value.deskripsi,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_.values(body).includes("")) return toast("Lengkapi Data");
|
if (_.values(body).includes("")) return toast("Lengkapi Data");
|
||||||
|
|
||||||
await fetch(ApiHipmi.create_portofolio, {
|
await funCreatePortofolio(body as any).then((res) => {
|
||||||
method: "POST",
|
if (res.status === 201) {
|
||||||
headers: {
|
toast("Berhasil disimpan");
|
||||||
"Content-Type": "application/json",
|
return setTimeout(() => router.push(`/dev/katalog/${profileId}`), 1000)
|
||||||
},
|
} else {
|
||||||
body: JSON.stringify(body),
|
return toast("Gagal disimpan");
|
||||||
})
|
}
|
||||||
.then((res) => res.json())
|
});
|
||||||
.then((val) => {
|
|
||||||
myConsole(val);
|
|
||||||
if (val.status == 201) {
|
|
||||||
toast("Berhasil disimpan");
|
|
||||||
return router.push("/dev/katalog/view");
|
|
||||||
} else {
|
|
||||||
return toast("Gagal disimpa");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(bidangBisnis)} */}
|
{/* {JSON.stringify(profileId)} */}
|
||||||
|
|
||||||
<Stack px={"sm"}>
|
<Stack px={"sm"}>
|
||||||
<TextInput
|
<TextInput
|
||||||
@@ -73,7 +65,7 @@ export default function CreatePortofolio({
|
|||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
label="Bidang Bisnis"
|
label="Bidang Bisnis"
|
||||||
data={_.map(bidangBisnis as any).map((e : any) => ({
|
data={_.map(bidangBisnis as any).map((e: any) => ({
|
||||||
value: e.id,
|
value: e.id,
|
||||||
label: e.name,
|
label: e.name,
|
||||||
}))}
|
}))}
|
||||||
@@ -108,7 +100,7 @@ export default function CreatePortofolio({
|
|||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
setValue({
|
setValue({
|
||||||
...value,
|
...value,
|
||||||
deskripssi: val.target.value,
|
deskripsi: val.target.value,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
"use server";
|
||||||
|
|
||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
import { MODEL_PORTOFOLIO } from "@/app_modules/models/portofolio";
|
||||||
|
import { revalidatePath } from "next/cache";
|
||||||
|
|
||||||
|
export default async function funCreatePortofolio(data: MODEL_PORTOFOLIO) {
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
const res = await prisma.katalog.create({
|
||||||
|
data: {
|
||||||
|
profileId: data.profileId,
|
||||||
|
namaBisnis: data.namaBisnis,
|
||||||
|
deskripsi: data.deskripsi,
|
||||||
|
tlpn: data.tlpn,
|
||||||
|
alamatKantor: data.alamatKantor,
|
||||||
|
masterBidangBisnisId: data.masterBidangBisnisId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!res)
|
||||||
|
return {
|
||||||
|
status: 401,
|
||||||
|
success: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
revalidatePath(`/dev/katalog/${data.profileId}`);
|
||||||
|
return {
|
||||||
|
status: 201,
|
||||||
|
success: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -12,9 +12,10 @@ export async function funGetListPortofolio(profileId: any) {
|
|||||||
namaBisnis: true,
|
namaBisnis: true,
|
||||||
alamatKantor: true,
|
alamatKantor: true,
|
||||||
tlpn: true,
|
tlpn: true,
|
||||||
deskripssi: true,
|
deskripsi: true,
|
||||||
masterBidangBisnisId: true,
|
masterBidangBisnisId: true,
|
||||||
active: true,
|
active: true,
|
||||||
|
profileId: true
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export async function getOnePortofolio(id: string) {
|
|||||||
id: true,
|
id: true,
|
||||||
namaBisnis: true,
|
namaBisnis: true,
|
||||||
alamatKantor: true,
|
alamatKantor: true,
|
||||||
deskripssi: true,
|
deskripsi: true,
|
||||||
tlpn: true,
|
tlpn: true,
|
||||||
active: true,
|
active: true,
|
||||||
MasterBidangBisnis: {
|
MasterBidangBisnis: {
|
||||||
@@ -22,6 +22,7 @@ export async function getOnePortofolio(id: string) {
|
|||||||
active: true,
|
active: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
profileId: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ import HeaderTransparent from "../../component/header_transparent";
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { IconArrowLeft, IconEdit } from "@tabler/icons-react";
|
import { IconArrowLeft, IconEdit } from "@tabler/icons-react";
|
||||||
|
|
||||||
export default function PortofolioLayout({ children }: { children: any }) {
|
export default function PortofolioLayout({ children, profileId }: { children: any, profileId: any }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTransparent
|
<HeaderTransparent
|
||||||
route={"/dev/katalog/view"}
|
route={`/dev/katalog/${profileId}`}
|
||||||
title="Portofolio"
|
title="Portofolio"
|
||||||
icon2={
|
icon2={
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import { GET_ONE_PORTOFOLIO } from "@/app_modules/models/portofolio";
|
import { MODEL_PORTOFOLIO } from "@/app_modules/models/portofolio";
|
||||||
import { Box, Button, Center, Text, Title } from "@mantine/core";
|
import { Box, Button, Center, Text, Title } from "@mantine/core";
|
||||||
import { IconTrash } from "@tabler/icons-react";
|
import { IconTrash } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -10,29 +10,22 @@ import { useState } from "react";
|
|||||||
export default function ViewPortofolio({
|
export default function ViewPortofolio({
|
||||||
dataPorto,
|
dataPorto,
|
||||||
}: {
|
}: {
|
||||||
dataPorto: GET_ONE_PORTOFOLIO;
|
dataPorto: MODEL_PORTOFOLIO;
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [porto, setPorto] = useState(dataPorto);
|
const [porto, setPorto] = useState(dataPorto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>{porto.namaBisnis}</Text>
|
<Text>{porto.namaBisnis}</Text>
|
||||||
<Text>{porto.alamatKantor}</Text>
|
<Text>{porto.alamatKantor}</Text>
|
||||||
<Text>+{porto.tlpn}</Text>
|
<Text>+{porto.tlpn}</Text>
|
||||||
<Text>{porto.deskripssi}</Text>
|
<Text>{porto.deskripsi}</Text>
|
||||||
<Text>{porto.MasterBidangBisnis.name}</Text>
|
<Text>{porto.MasterBidangBisnis.name}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
<Center mt={"md"}>
|
<Center mt={"md"}>
|
||||||
<Button bg={"red"} color="red" w={300}
|
<Button bg={"red"} color="red" w={300} onClick={() => {}}>
|
||||||
onClick={() => {
|
|
||||||
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconTrash />
|
<IconTrash />
|
||||||
</Button>{" "}
|
</Button>{" "}
|
||||||
</Center>
|
</Center>
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import _ from "lodash";
|
|||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
|
import funCreateNewProfile from "../fun/fun_create_profile";
|
||||||
|
|
||||||
export default function CreateProfile() {
|
export default function CreateProfile({ userId }: { userId: any }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [token, setToken] = useAtom(gs_token);
|
|
||||||
|
|
||||||
const [value, setValue] = useState({
|
const [value, setValue] = useState({
|
||||||
name: "",
|
name: "",
|
||||||
@@ -24,7 +24,7 @@ export default function CreateProfile() {
|
|||||||
|
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
const body = {
|
const body = {
|
||||||
userId: token?.id,
|
userId: userId,
|
||||||
name: value.name,
|
name: value.name,
|
||||||
email: value.email,
|
email: value.email,
|
||||||
alamat: value.alamat,
|
alamat: value.alamat,
|
||||||
@@ -36,22 +36,14 @@ export default function CreateProfile() {
|
|||||||
if (_.values(value).includes("")) return toast("Lengkapi data");
|
if (_.values(value).includes("")) return toast("Lengkapi data");
|
||||||
// if(_.values(value.email).includes(`${/^\S+@\S+$/.test(value.email) ? null : "Invalid email"}`)){}
|
// if(_.values(value.email).includes(`${/^\S+@\S+$/.test(value.email) ? null : "Invalid email"}`)){}
|
||||||
|
|
||||||
await fetch(ApiHipmi.create_profile, {
|
await funCreateNewProfile(body).then((res) => {
|
||||||
method: "POST",
|
if (res.status === 201) {
|
||||||
headers: {
|
toast("Data tersimpan");
|
||||||
"Content-Type": "application/json",
|
return router.push("/dev/katalog/view");
|
||||||
},
|
} else {
|
||||||
body: JSON.stringify(body),
|
toast("Gagal")
|
||||||
})
|
}
|
||||||
.then((res) => res.json())
|
});
|
||||||
.then((val) => {
|
|
||||||
if (val.status == 201) {
|
|
||||||
toast("Data tersimpan")
|
|
||||||
return router.push("/dev/katalog/view");
|
|
||||||
} else {
|
|
||||||
return toast("Server Error!!!")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
import { IconArrowLeft } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function EditProfileLayout({ children }: { children: any }) {
|
export default function EditProfileLayout({ children, profileId }: { children: any, profileId: any }) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -20,7 +20,7 @@ export default function EditProfileLayout({ children }: { children: any }) {
|
|||||||
header={
|
header={
|
||||||
<Header height={50} px={"sm"}>
|
<Header height={50} px={"sm"}>
|
||||||
<Group position="apart" h={50}>
|
<Group position="apart" h={50}>
|
||||||
<ActionIcon variant="transparent" onClick={() => router.push("/dev/katalog/view")}>
|
<ActionIcon variant="transparent" onClick={() => router.push(`/dev/katalog/${profileId}`)}>
|
||||||
<IconArrowLeft />
|
<IconArrowLeft />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
<Text>Edit Profile</Text>
|
<Text>Edit Profile</Text>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { myConsole } from "@/app/fun/my_console";
|
|||||||
import { ApiHipmi } from "@/app/lib/api";
|
import { ApiHipmi } from "@/app/lib/api";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import { gs_token } from "@/app_modules/home/state/global_state";
|
import { gs_token } from "@/app_modules/home/state/global_state";
|
||||||
import { Button, Select, Stack, TextInput } from "@mantine/core";
|
import { Button, Loader, Select, Stack, TextInput } from "@mantine/core";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
@@ -13,57 +13,53 @@ import { useState } from "react";
|
|||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
import { gs_profile } from "../state/global_state";
|
import { gs_profile } from "../state/global_state";
|
||||||
import { loadDataProfile } from "../fun/fun_get_profile";
|
import { loadDataProfile } from "../fun/fun_get_profile";
|
||||||
|
import { USER_PROFILE } from "@/app_modules/models/user_profile";
|
||||||
|
import funEditProfile from "../fun/fun_edit_profile";
|
||||||
|
|
||||||
export default function EditProfile({ data }: { data: any }) {
|
export default function EditProfile({ data }: { data: USER_PROFILE }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
//Get data profile
|
//Get data profile
|
||||||
const [profile, setProfile] = useAtom(gs_profile)
|
const [dataProfile, setDataProfile] = useState(data);
|
||||||
useShallowEffect(() => {
|
|
||||||
loadDataProfile(setProfile);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
async function onUpdate() {
|
async function onUpdate() {
|
||||||
const body = profile;
|
const body = dataProfile;
|
||||||
if (_.values(body).includes("")) return toast("Lengkapi data");
|
if (_.values(body).includes("")) return toast("Lengkapi data");
|
||||||
|
|
||||||
await fetch(ApiHipmi.edit_profile, {
|
await funEditProfile(body).then((res) => {
|
||||||
method: "POST",
|
if (res.status === 200) {
|
||||||
headers: {
|
toast("Update berhasil");
|
||||||
"Content-Type": "application/json",
|
setTimeout(() => router.push(`/dev/katalog/${data.Profile?.id}`), 1000);
|
||||||
},
|
} else {
|
||||||
body: JSON.stringify(body),
|
toast("Gagal update");
|
||||||
})
|
}
|
||||||
.then((res) => res.json())
|
});
|
||||||
.then((val) => {
|
|
||||||
myConsole(val);
|
|
||||||
if (val.status == 200) {
|
|
||||||
toast("Data tersimpan");
|
|
||||||
loadDataProfile(setProfile)
|
|
||||||
return setTimeout(() => router.push("/dev/katalog/view"), 1000);
|
|
||||||
} else {
|
|
||||||
return toast("Gagal update !!!");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!profile) return <></>
|
if (!dataProfile)
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Loader />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(profile)} */}
|
|
||||||
<Stack px={"sm"}>
|
<Stack px={"sm"}>
|
||||||
<TextInput label="Username" disabled value={profile?.User.username} />
|
<TextInput label="Username" disabled value={dataProfile.username} />
|
||||||
<TextInput label="Nomor" disabled value={profile?.User.nomor} />
|
<TextInput label="Nomor" disabled value={dataProfile.nomor} />
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
label="Nama"
|
label="Nama"
|
||||||
placeholder="username"
|
placeholder="username"
|
||||||
value={profile?.name}
|
value={dataProfile.Profile?.name}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
setProfile({
|
setDataProfile({
|
||||||
...profile,
|
...(dataProfile as any),
|
||||||
name: val.target.value,
|
Profile: {
|
||||||
|
...dataProfile.Profile,
|
||||||
|
name: val.target.value,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -71,12 +67,14 @@ export default function EditProfile({ data }: { data: any }) {
|
|||||||
<TextInput
|
<TextInput
|
||||||
label="Email"
|
label="Email"
|
||||||
placeholder="email"
|
placeholder="email"
|
||||||
value={profile?.email}
|
value={dataProfile.Profile?.email}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
myConsole(val.target.value);
|
setDataProfile({
|
||||||
setProfile({
|
...(dataProfile as any),
|
||||||
...profile,
|
Profile: {
|
||||||
email: val.target.value,
|
...dataProfile.Profile,
|
||||||
|
email: val.target.value,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -84,27 +82,32 @@ export default function EditProfile({ data }: { data: any }) {
|
|||||||
<TextInput
|
<TextInput
|
||||||
label="Alamat"
|
label="Alamat"
|
||||||
placeholder="alamat"
|
placeholder="alamat"
|
||||||
value={profile?.alamat}
|
value={dataProfile.Profile?.alamat}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
myConsole(val.target.value);
|
setDataProfile({
|
||||||
setProfile({
|
...(dataProfile as any),
|
||||||
...profile,
|
Profile: {
|
||||||
alamat: val.target.value,
|
...dataProfile.Profile,
|
||||||
|
alamat: val.target.value,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
label="Jenis Kelamin"
|
label="Jenis Kelamin"
|
||||||
value={profile?.jenisKelamin}
|
value={dataProfile.Profile?.jenisKelamin}
|
||||||
data={[
|
data={[
|
||||||
{ value: "Laki-laki", label: "Laki-laki" },
|
{ value: "Laki-laki", label: "Laki-laki" },
|
||||||
{ value: "Perempuan", label: "Perempuan" },
|
{ value: "Perempuan", label: "Perempuan" },
|
||||||
]}
|
]}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
setProfile({
|
setDataProfile({
|
||||||
...profile,
|
...(dataProfile as any),
|
||||||
jenisKelamin: val as string,
|
Profile: {
|
||||||
|
...dataProfile.Profile,
|
||||||
|
jenisKelamin: val,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -119,6 +122,8 @@ export default function EditProfile({ data }: { data: any }) {
|
|||||||
Update
|
Update
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
|
{/* <pre>{JSON.stringify(dataProfile, null, 2)}</pre> */}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
25
src/app_modules/katalog/profile/fun/fun_create_profile.ts
Normal file
25
src/app_modules/katalog/profile/fun/fun_create_profile.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
"use server";
|
||||||
|
|
||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
|
||||||
|
export default async function funCreateNewProfile(data: any) {
|
||||||
|
console.log(data);
|
||||||
|
const body = data;
|
||||||
|
|
||||||
|
const res = await prisma.profile.create({
|
||||||
|
data: {
|
||||||
|
userId: body.userId,
|
||||||
|
name: body.name,
|
||||||
|
email: body.email,
|
||||||
|
alamat: body.alamat,
|
||||||
|
jenisKelamin: body.jenisKelamin,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!res) return { status: 400 };
|
||||||
|
|
||||||
|
return {
|
||||||
|
status: 201,
|
||||||
|
success: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
25
src/app_modules/katalog/profile/fun/fun_edit_profile.ts
Normal file
25
src/app_modules/katalog/profile/fun/fun_edit_profile.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
"use server";
|
||||||
|
|
||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
import { USER_PROFILE } from "@/app_modules/models/user_profile";
|
||||||
|
|
||||||
|
export default async function funEditProfile(data: USER_PROFILE) {
|
||||||
|
const res = await prisma.profile.update({
|
||||||
|
where: {
|
||||||
|
id: data.Profile?.id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
name: data.Profile?.name,
|
||||||
|
email: data.Profile?.email,
|
||||||
|
alamat: data.Profile?.alamat,
|
||||||
|
jenisKelamin: data.Profile?.jenisKelamin,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!res) return { status: 400 };
|
||||||
|
|
||||||
|
return {
|
||||||
|
status: 200,
|
||||||
|
success: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -45,7 +45,6 @@ export default function ProfileView({ user }: { user: USER_PROFILE }) {
|
|||||||
if (!stateUser) return <></>;
|
if (!stateUser) return <></>;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(stateUser)} */}
|
|
||||||
{/* Background dan foto */}
|
{/* Background dan foto */}
|
||||||
<Box>
|
<Box>
|
||||||
<Paper bg={"gray"} p={"md"}>
|
<Paper bg={"gray"} p={"md"}>
|
||||||
@@ -67,7 +66,6 @@ export default function ProfileView({ user }: { user: USER_PROFILE }) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Center h={101}>
|
<Center h={101}>
|
||||||
{/* {stateUser.Profile?.ImageProfile?.url} */}
|
|
||||||
{stateUser.Profile?.ImageProfile?.url && (
|
{stateUser.Profile?.ImageProfile?.url && (
|
||||||
<Image
|
<Image
|
||||||
src={ApiHipmi.get_foto + stateUser.Profile?.ImageProfile?.url}
|
src={ApiHipmi.get_foto + stateUser.Profile?.ImageProfile?.url}
|
||||||
@@ -75,11 +73,6 @@ export default function ProfileView({ user }: { user: USER_PROFILE }) {
|
|||||||
radius={100}
|
radius={100}
|
||||||
width={100}
|
width={100}
|
||||||
height={100}
|
height={100}
|
||||||
sx={
|
|
||||||
{
|
|
||||||
// position: "fixed",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Center>
|
</Center>
|
||||||
@@ -93,7 +86,7 @@ export default function ProfileView({ user }: { user: USER_PROFILE }) {
|
|||||||
variant="transparent"
|
variant="transparent"
|
||||||
bg={"gray"}
|
bg={"gray"}
|
||||||
radius={50}
|
radius={50}
|
||||||
onClick={() => router.push("/dev/profile/upload")}
|
onClick={() => router.push(`/dev/profile/upload/${stateUser.Profile?.id}`)}
|
||||||
sx={{ position: "relative" }}
|
sx={{ position: "relative" }}
|
||||||
>
|
>
|
||||||
<IconCamera color="black" size={20} />
|
<IconCamera color="black" size={20} />
|
||||||
@@ -112,7 +105,7 @@ export default function ProfileView({ user }: { user: USER_PROFILE }) {
|
|||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="transparent"
|
variant="transparent"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
router.push("/dev/profile/edit");
|
router.push(`/dev/profile/edit/${stateUser.id}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconEditCircle color={Warna.hijau_muda} size={20} />
|
<IconEditCircle color={Warna.hijau_muda} size={20} />
|
||||||
|
|||||||
@@ -18,27 +18,29 @@ import { useShallowEffect } from "@mantine/hooks";
|
|||||||
import { loadDataProfile } from "../fun/fun_get_profile";
|
import { loadDataProfile } from "../fun/fun_get_profile";
|
||||||
import { funUploadFoto } from "../fun/upload_foto";
|
import { funUploadFoto } from "../fun/upload_foto";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
export default function UploadFotoProfileLayout({
|
export default function UploadFotoProfileLayout({
|
||||||
children,
|
children,
|
||||||
|
profileId
|
||||||
}: {
|
}: {
|
||||||
children: any;
|
children: any;
|
||||||
|
profileId: any
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const [profile, setProfile] = useAtom(gs_profile);
|
const [profile, setProfile] = useState(profileId)
|
||||||
useShallowEffect(() => {
|
|
||||||
loadDataProfile(setProfile);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{JSON.stringify(profileId)}
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<Header height={50} px={"sm"}>
|
<Header height={50} px={"sm"}>
|
||||||
<Group position="apart" h={50}>
|
<Group position="apart" h={50}>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="transparent"
|
variant="transparent"
|
||||||
onClick={() => router.push("/dev/katalog/view")}
|
onClick={() => router.push(`/dev/katalog/${profile}`)}
|
||||||
>
|
>
|
||||||
<IconArrowLeft />
|
<IconArrowLeft />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
@@ -54,7 +56,7 @@ export default function UploadFotoProfileLayout({
|
|||||||
<Flex direction={"column"} align={"center"}>
|
<Flex direction={"column"} align={"center"}>
|
||||||
<FileButton
|
<FileButton
|
||||||
onChange={async (files) => {
|
onChange={async (files) => {
|
||||||
const id = profile?.id
|
const id = profile
|
||||||
|
|
||||||
if (!files) return toast("File Kosong");
|
if (!files) return toast("File Kosong");
|
||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
@@ -63,7 +65,7 @@ export default function UploadFotoProfileLayout({
|
|||||||
const upFoto = await funUploadFoto(fd, id);
|
const upFoto = await funUploadFoto(fd, id);
|
||||||
if (upFoto.success) {
|
if (upFoto.success) {
|
||||||
toast("Upload berhasil");
|
toast("Upload berhasil");
|
||||||
router.push("/dev/katalog/view")
|
router.push(`/dev/katalog/${profile}`)
|
||||||
// loadDataProfile(valUser.id, setUser, setProfile);
|
// loadDataProfile(valUser.id, setUser, setProfile);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export interface LIST_PORTOFOLIO {
|
|||||||
deskripssi: string;
|
deskripssi: string;
|
||||||
masterBidangBisnisId: string;
|
masterBidangBisnisId: string;
|
||||||
active: boolean;
|
active: boolean;
|
||||||
|
profileId: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BIDANG_BISNIS {
|
export interface BIDANG_BISNIS {
|
||||||
@@ -14,12 +15,14 @@ export interface BIDANG_BISNIS {
|
|||||||
active: boolean;
|
active: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GET_ONE_PORTOFOLIO {
|
export interface MODEL_PORTOFOLIO {
|
||||||
id: string;
|
id: string;
|
||||||
namaBisnis: string;
|
namaBisnis: string;
|
||||||
alamatKantor: string;
|
alamatKantor: string;
|
||||||
deskripssi: string;
|
deskripsi: string;
|
||||||
tlpn: string;
|
tlpn: string;
|
||||||
active: boolean;
|
active: boolean;
|
||||||
MasterBidangBisnis: BIDANG_BISNIS;
|
MasterBidangBisnis: BIDANG_BISNIS;
|
||||||
|
masterBidangBisnisId: string
|
||||||
|
profileId: string,
|
||||||
}
|
}
|
||||||
|
|||||||
63
yarn.lock
63
yarn.lock
@@ -545,6 +545,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.3.2.tgz#31b9c510d8cada9683549e1dbb4284cca5001faf"
|
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.3.2.tgz#31b9c510d8cada9683549e1dbb4284cca5001faf"
|
||||||
integrity sha512-V+MvGwaHH03hYhY+k6Ef/xKd6RYlc4q8WBx+2ANmipHJcKuktNcI/NgEsJgdSUF6Lw32njT6OnrRsKYCdgHjYw==
|
integrity sha512-V+MvGwaHH03hYhY+k6Ef/xKd6RYlc4q8WBx+2ANmipHJcKuktNcI/NgEsJgdSUF6Lw32njT6OnrRsKYCdgHjYw==
|
||||||
|
|
||||||
|
"@socket.io/component-emitter@~3.1.0":
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553"
|
||||||
|
integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==
|
||||||
|
|
||||||
"@swc/helpers@0.5.2":
|
"@swc/helpers@0.5.2":
|
||||||
version "0.5.2"
|
version "0.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d"
|
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d"
|
||||||
@@ -1144,6 +1149,11 @@ clsx@1.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188"
|
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188"
|
||||||
integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==
|
integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==
|
||||||
|
|
||||||
|
clsx@^1.1.1:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12"
|
||||||
|
integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==
|
||||||
|
|
||||||
color-convert@^1.9.0:
|
color-convert@^1.9.0:
|
||||||
version "1.9.3"
|
version "1.9.3"
|
||||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
|
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
|
||||||
@@ -1240,7 +1250,7 @@ debug@^3.2.7:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms "^2.1.1"
|
ms "^2.1.1"
|
||||||
|
|
||||||
debug@^4.1.1, debug@^4.3.2, debug@^4.3.4:
|
debug@^4.1.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2:
|
||||||
version "4.3.4"
|
version "4.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||||
@@ -1371,6 +1381,22 @@ emoji-regex@^9.2.2:
|
|||||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
|
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
|
||||||
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
|
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
|
||||||
|
|
||||||
|
engine.io-client@~6.5.2:
|
||||||
|
version "6.5.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.5.2.tgz#8709e22c291d4297ae80318d3c8baeae71f0e002"
|
||||||
|
integrity sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==
|
||||||
|
dependencies:
|
||||||
|
"@socket.io/component-emitter" "~3.1.0"
|
||||||
|
debug "~4.3.1"
|
||||||
|
engine.io-parser "~5.2.1"
|
||||||
|
ws "~8.11.0"
|
||||||
|
xmlhttprequest-ssl "~2.0.0"
|
||||||
|
|
||||||
|
engine.io-parser@~5.2.1:
|
||||||
|
version "5.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.1.tgz#9f213c77512ff1a6cc0c7a86108a7ffceb16fcfb"
|
||||||
|
integrity sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==
|
||||||
|
|
||||||
enhanced-resolve@^5.12.0:
|
enhanced-resolve@^5.12.0:
|
||||||
version "5.15.0"
|
version "5.15.0"
|
||||||
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35"
|
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35"
|
||||||
@@ -2939,6 +2965,13 @@ react-textarea-autosize@8.3.4:
|
|||||||
use-composed-ref "^1.3.0"
|
use-composed-ref "^1.3.0"
|
||||||
use-latest "^1.2.1"
|
use-latest "^1.2.1"
|
||||||
|
|
||||||
|
react-toastify@^9.1.3:
|
||||||
|
version "9.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-toastify/-/react-toastify-9.1.3.tgz#1e798d260d606f50e0fab5ee31daaae1d628c5ff"
|
||||||
|
integrity sha512-fPfb8ghtn/XMxw3LkxQBk3IyagNpF/LIKjOBflbexr2AWxAH1MJgvnESwEwBn9liLFXgTKWgBSdZpw9m4OTHTg==
|
||||||
|
dependencies:
|
||||||
|
clsx "^1.1.1"
|
||||||
|
|
||||||
react@18.2.0:
|
react@18.2.0:
|
||||||
version "18.2.0"
|
version "18.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
||||||
@@ -3130,6 +3163,24 @@ slash@^4.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
|
resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
|
||||||
integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
|
integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
|
||||||
|
|
||||||
|
socket.io-client@^4.7.2:
|
||||||
|
version "4.7.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.7.2.tgz#f2f13f68058bd4e40f94f2a1541f275157ff2c08"
|
||||||
|
integrity sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==
|
||||||
|
dependencies:
|
||||||
|
"@socket.io/component-emitter" "~3.1.0"
|
||||||
|
debug "~4.3.2"
|
||||||
|
engine.io-client "~6.5.2"
|
||||||
|
socket.io-parser "~4.2.4"
|
||||||
|
|
||||||
|
socket.io-parser@~4.2.4:
|
||||||
|
version "4.2.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83"
|
||||||
|
integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==
|
||||||
|
dependencies:
|
||||||
|
"@socket.io/component-emitter" "~3.1.0"
|
||||||
|
debug "~4.3.1"
|
||||||
|
|
||||||
source-map-js@^1.0.2:
|
source-map-js@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||||
@@ -3596,6 +3647,16 @@ wrappy@1:
|
|||||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
|
||||||
|
|
||||||
|
ws@~8.11.0:
|
||||||
|
version "8.11.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143"
|
||||||
|
integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==
|
||||||
|
|
||||||
|
xmlhttprequest-ssl@~2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67"
|
||||||
|
integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==
|
||||||
|
|
||||||
xtend@~2.1.1:
|
xtend@~2.1.1:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b"
|
resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b"
|
||||||
|
|||||||
Reference in New Issue
Block a user