Compare commits
No commits in common. "65e7c9db41e0ca8288ea4488d3e7d91e2ad2260b" and "7b364dfbc9bcbcb6b7a851993d1e0a2ff622774d" have entirely different histories.
65e7c9db41
...
7b364dfbc9
|
|
@ -551,7 +551,7 @@ export default function SignUp() {
|
||||||
{/* Radio Buttons */}
|
{/* Radio Buttons */}
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
defaultValue="umum"
|
defaultValue="umum"
|
||||||
className="flex justify-between gap-2 mb-6"
|
className="grid grid-cols-2 sm:grid-cols-4 gap-2 mb-6"
|
||||||
onValueChange={(val) => setRole(val)}
|
onValueChange={(val) => setRole(val)}
|
||||||
>
|
>
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
|
|
@ -562,10 +562,10 @@ export default function SignUp() {
|
||||||
<RadioGroupItem value="jurnalis" id="jurnalis" />
|
<RadioGroupItem value="jurnalis" id="jurnalis" />
|
||||||
<Label htmlFor="jurnalis">Jurnalis</Label>
|
<Label htmlFor="jurnalis">Jurnalis</Label>
|
||||||
</div>
|
</div>
|
||||||
{/* <div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<RadioGroupItem value="kontributor" id="kontributor" />
|
<RadioGroupItem value="kontributor" id="kontributor" />
|
||||||
<Label htmlFor="kontributor">Kontributor</Label>
|
<Label htmlFor="kontributor">Kontributor</Label>
|
||||||
</div> */}
|
</div>
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<RadioGroupItem value="tenant" id="tenant" />
|
<RadioGroupItem value="tenant" id="tenant" />
|
||||||
<Label htmlFor="tenant">Tenant</Label>
|
<Label htmlFor="tenant">Tenant</Label>
|
||||||
|
|
@ -592,13 +592,13 @@ export default function SignUp() {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Email */}
|
{/* Email */}
|
||||||
<Input
|
{/* <Input
|
||||||
type="email"
|
type="email"
|
||||||
required
|
required
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
value={email}
|
value={email}
|
||||||
onChange={(e) => setEmail(e.target.value)}
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
{/* Password */}
|
{/* Password */}
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ const createUserSchema = z.object({
|
||||||
.min(1, { message: "Phone Number wajib diisi" }),
|
.min(1, { message: "Phone Number wajib diisi" }),
|
||||||
userLevelId: z.number({ invalid_type_error: "User Level harus dipilih" }),
|
userLevelId: z.number({ invalid_type_error: "User Level harus dipilih" }),
|
||||||
username: z.string().trim().min(1, { message: "Username wajib diisi" }),
|
username: z.string().trim().min(1, { message: "Username wajib diisi" }),
|
||||||
role: z.enum(["approver", "contributor"]),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const editUserSchema = z.object({
|
const editUserSchema = z.object({
|
||||||
|
|
@ -115,7 +114,6 @@ export default function UserForm({
|
||||||
phoneNumber: "",
|
phoneNumber: "",
|
||||||
userLevelId: 0,
|
userLevelId: 0,
|
||||||
username: "",
|
username: "",
|
||||||
role: "contributor",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -421,29 +419,6 @@ export default function UserForm({
|
||||||
</p>
|
</p>
|
||||||
</div> */}
|
</div> */}
|
||||||
|
|
||||||
{/* Role */}
|
|
||||||
<div>
|
|
||||||
<Label>Role</Label>
|
|
||||||
<Controller
|
|
||||||
control={control}
|
|
||||||
name="role"
|
|
||||||
render={({ field }) => (
|
|
||||||
<Select
|
|
||||||
onValueChange={(value) => field.onChange(value)}
|
|
||||||
value={field.value || ""}
|
|
||||||
>
|
|
||||||
<SelectTrigger>
|
|
||||||
<SelectValue placeholder="Pilih role" />
|
|
||||||
</SelectTrigger>
|
|
||||||
<SelectContent>
|
|
||||||
<SelectItem value="approver">Approver</SelectItem>
|
|
||||||
<SelectItem value="contributor">Contributor</SelectItem>
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* User Level */}
|
{/* User Level */}
|
||||||
<div>
|
<div>
|
||||||
<Label>User Level</Label>
|
<Label>User Level</Label>
|
||||||
|
|
|
||||||
|
|
@ -93,11 +93,9 @@ export default function VideoDetail({ id }: { id: number }) {
|
||||||
downloadCount: file.download_count,
|
downloadCount: file.download_count,
|
||||||
createdAt: file.created_at,
|
createdAt: file.created_at,
|
||||||
updatedAt: file.updated_at,
|
updatedAt: file.updated_at,
|
||||||
// thumbnailFileUrl:
|
thumbnailFileUrl:
|
||||||
// file.file_thumbnail || articleData.thumbnailUrl,
|
file.file_thumbnail || articleData.thumbnailUrl,
|
||||||
// ...file,
|
...file,
|
||||||
// })) || [],
|
|
||||||
thumbnailFileUrl: articleData.thumbnailUrl || "/notfound.png",
|
|
||||||
})) || [],
|
})) || [],
|
||||||
...articleData,
|
...articleData,
|
||||||
};
|
};
|
||||||
|
|
@ -169,8 +167,8 @@ export default function VideoDetail({ id }: { id: number }) {
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src={
|
src={
|
||||||
file?.thumbnailUrl?.trim()
|
file?.thumbnailFileUrl?.trim()
|
||||||
? file.thumbnailUrl
|
? file.thumbnailFileUrl
|
||||||
: "/notfound.png"
|
: "/notfound.png"
|
||||||
}
|
}
|
||||||
alt={file?.fileName || "thumbnail"}
|
alt={file?.fileName || "thumbnail"}
|
||||||
|
|
@ -180,7 +178,6 @@ export default function VideoDetail({ id }: { id: number }) {
|
||||||
selectedVideo === index ? "ring-2 ring-red-600" : ""
|
selectedVideo === index ? "ring-2 ring-red-600" : ""
|
||||||
}`}
|
}`}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
...(Number(userRoleId) === 3 || Number(userRoleId) === 5
|
...(Number(userRoleId) === 3
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
groupLabel: "",
|
groupLabel: "",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue