schema prisma
deskripsi: - penambahan jenis kelamin pada db sticker
This commit is contained in:
@@ -1066,6 +1066,7 @@ model Sticker {
|
|||||||
fileName String?
|
fileName String?
|
||||||
fileExt String?
|
fileExt String?
|
||||||
fileId String
|
fileId String
|
||||||
|
jenisKelamin String?
|
||||||
|
|
||||||
MasterEmotions MasterEmotions[] @relation("StikerEmotions")
|
MasterEmotions MasterEmotions[] @relation("StikerEmotions")
|
||||||
}
|
}
|
||||||
|
|||||||
4
src/app_modules/_global/lib/master_jenis_kelamin.tsx
Normal file
4
src/app_modules/_global/lib/master_jenis_kelamin.tsx
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export const masterJenisKelamin = [
|
||||||
|
{ value: "Laki-laki", label: "Laki-laki" },
|
||||||
|
{ value: "Perempuan", label: "Perempuan" },
|
||||||
|
];
|
||||||
@@ -21,7 +21,6 @@ import {
|
|||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useDisclosure, useShallowEffect } from "@mantine/hooks";
|
import { useDisclosure, useShallowEffect } from "@mantine/hooks";
|
||||||
import { IconX } from "@tabler/icons-react";
|
import { IconX } from "@tabler/icons-react";
|
||||||
import dynamic from "next/dynamic";
|
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { forum_funCreateKomentar } from "../../fun/create/fun_create_komentar";
|
import { forum_funCreateKomentar } from "../../fun/create/fun_create_komentar";
|
||||||
import {
|
import {
|
||||||
@@ -30,24 +29,6 @@ import {
|
|||||||
} from "../../model/interface";
|
} from "../../model/interface";
|
||||||
import { ISticker } from "@/app_modules/_global/lib/interface/stiker";
|
import { ISticker } from "@/app_modules/_global/lib/interface/stiker";
|
||||||
|
|
||||||
const ReactQuill = dynamic(
|
|
||||||
async () => {
|
|
||||||
const { default: RQ } = await import("react-quill");
|
|
||||||
// Tidak perlu import CSS dengan import statement
|
|
||||||
return function comp({ forwardedRef, ...props }: any) {
|
|
||||||
return <RQ ref={forwardedRef} {...props} />;
|
|
||||||
};
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ssr: false,
|
|
||||||
loading: () => (
|
|
||||||
<Text fs={"italic"} c={"gray.8"} fz={12}>
|
|
||||||
Ketik pesan di sini atau tambahkan stiker...
|
|
||||||
</Text>
|
|
||||||
),
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
export default function Forum_V3_CreateKomentar({
|
export default function Forum_V3_CreateKomentar({
|
||||||
postingId,
|
postingId,
|
||||||
data,
|
data,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { emailRegex } from "../../component/regular_expressions";
|
|||||||
import { Profile_ComponentCreateNewProfile } from "../_component";
|
import { Profile_ComponentCreateNewProfile } from "../_component";
|
||||||
import Profile_ViewUploadBackground from "./view_upload_background";
|
import Profile_ViewUploadBackground from "./view_upload_background";
|
||||||
import Profile_ViewUploadFoto from "./view_upload_foto";
|
import Profile_ViewUploadFoto from "./view_upload_foto";
|
||||||
|
import { masterJenisKelamin } from "@/app_modules/_global/lib/master_jenis_kelamin";
|
||||||
|
|
||||||
export default function CreateProfile() {
|
export default function CreateProfile() {
|
||||||
const [filePP, setFilePP] = useState<File | null>(null);
|
const [filePP, setFilePP] = useState<File | null>(null);
|
||||||
@@ -111,10 +112,7 @@ export default function CreateProfile() {
|
|||||||
withAsterisk
|
withAsterisk
|
||||||
label="Jenis Kelamin"
|
label="Jenis Kelamin"
|
||||||
placeholder="Pilih satu"
|
placeholder="Pilih satu"
|
||||||
data={[
|
data={masterJenisKelamin}
|
||||||
{ value: "Laki-laki", label: "Laki-laki" },
|
|
||||||
{ value: "Perempuan", label: "Perempuan" },
|
|
||||||
]}
|
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
setValue({
|
setValue({
|
||||||
...value,
|
...value,
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import {
|
|||||||
apiUpdateProfile,
|
apiUpdateProfile,
|
||||||
} from "../lib/api_fetch_profile";
|
} from "../lib/api_fetch_profile";
|
||||||
import { MODEL_PROFILE } from "../model/interface";
|
import { MODEL_PROFILE } from "../model/interface";
|
||||||
|
import { masterJenisKelamin } from "@/app_modules/_global/lib/master_jenis_kelamin";
|
||||||
|
|
||||||
export default function EditProfile() {
|
export default function EditProfile() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -211,10 +212,7 @@ export default function EditProfile() {
|
|||||||
withAsterisk
|
withAsterisk
|
||||||
label="Jenis Kelamin"
|
label="Jenis Kelamin"
|
||||||
value={data?.jenisKelamin}
|
value={data?.jenisKelamin}
|
||||||
data={[
|
data={masterJenisKelamin}
|
||||||
{ value: "Laki-laki", label: "Laki-laki" },
|
|
||||||
{ value: "Perempuan", label: "Perempuan" },
|
|
||||||
]}
|
|
||||||
onChange={(val: any) => {
|
onChange={(val: any) => {
|
||||||
setData({
|
setData({
|
||||||
...data,
|
...data,
|
||||||
|
|||||||
Reference in New Issue
Block a user