Deskripsi:
- Upload foto profil ke storage
- Upload background profile ke storge
## No Issue
This commit is contained in:
2024-09-25 14:04:18 +08:00
parent 5670feb08c
commit 827b7c7bc1
54 changed files with 812 additions and 936 deletions

View File

@@ -1,9 +1,35 @@
"use client";
import { Box, Center, Image, Loader, Text } from "@mantine/core";
import {
ActionIcon,
Avatar,
Box,
Center,
Image,
Loader,
Text,
} from "@mantine/core";
import { useShallowEffect } from "@mantine/hooks";
import { useState } from "react";
export default function Page() {
return (
<>
<Box p={"lg"} bg={"gray"} h={"100vh"}>
<Center h={"100%"}>
<ActionIcon bg={"blue"}>
<Avatar
size={100}
radius={"100%"}
src={
// "https://wibu-storage.wibudev.com/api/files/cm1efheqx005vkp7jo7lqarnf"
"/aset/global/avatar.png"
}
/>
</ActionIcon>
</Center>
</Box>
</>
);
return (
<>
<LoadImage

View File

@@ -1,8 +1,18 @@
import { CreatePortofolio, CreatePortofolioLayout, PortofolioLayout } from "@/app_modules/katalog/portofolio";
import { CreatePortofolioLayout } 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>
export default async function Layout({
children,
params,
}: {
children: React.ReactNode;
params: { id: string };
}) {
return (
<>
<CreatePortofolioLayout profileId={params.id}>
{children}
</CreatePortofolioLayout>
</>
}
);
}

View File

@@ -2,13 +2,14 @@ import { CreatePortofolio } from "@/app_modules/katalog/portofolio";
import { Portofolio_getMasterBidangBisnis } from "@/app_modules/katalog/portofolio/fun/master/get_bidang_bisnis";
export default async function Page({ params }: { params: { id: string } }) {
const profileId = params.id;
const bidangBisnis = await Portofolio_getMasterBidangBisnis();
return (
<>
<CreatePortofolio
bidangBisnis={bidangBisnis as any}
profileId={params.id}
profileId={profileId}
/>
</>
);

View File

@@ -2,11 +2,9 @@ import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import { CreateProfile } from "@/app_modules/katalog/profile";
export default async function Page() {
const userLoginId = await funGetUserIdByToken();
return (
<>
<CreateProfile userLoginId={userLoginId} />
<CreateProfile />
</>
);
}

View File

@@ -1,7 +1,14 @@
const APIs = {
GET: "https://wibu-storage.wibudev.com/api/files/",
/**
*
* @param fileId | file id from wibu storage , atau bisa disimpan di DB
* @param size | file size 10 - 1000 , tergantung ukuran file dan kebutuhan saar di tampilkan
* @type {string}
*/
GET: ({ fileId, size }: { fileId: string; size?: string }) =>
size
? `https://wibu-storage.wibudev.com/api/files/${fileId}-size-${size}`
: `https://wibu-storage.wibudev.com/api/files/${fileId}`,
};
export default APIs
export default APIs;