# Fix
- Loading card
- Create : saat memilih jam sesuai dengan batas jam di hari itu
## No isuuee
This commit is contained in:
2024-05-23 17:17:40 +08:00
parent 10cf9c3a46
commit 166b1349f5
22 changed files with 484 additions and 400 deletions

View File

@@ -75,15 +75,15 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: MODEL_EVENT[] }) {
Peserta
</Button>
</td>
<td>{e.title}</td>
<td>{e.lokasi}</td>
<td>{e.EventMaster_TipeAcara.name}</td>
<td>{e.tanggal.toLocaleString("id-ID", { dateStyle: "full" })}</td>
<td>{e?.Author?.Profile?.name}</td>
<td>{e?.title}</td>
<td>{e?.lokasi}</td>
<td>{e?.EventMaster_TipeAcara?.name}</td>
<td>{e?.tanggal.toLocaleString("id-ID", { dateStyle: "full" })}</td>
<td>
{e.tanggal.toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
hour12: false,
})}
</td>
<td>
@@ -121,23 +121,24 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: MODEL_EVENT[] }) {
<Stack>
{peserta?.map((e) => (
<Stack key={e.id} spacing={"xs"}>
<Grid >
<Grid.Col span={"content"}>
<Avatar
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
radius={"xl"}
src={
RouterProfile.api_foto_profile + e?.User?.Profile?.imagesId
}
/>
</Grid.Col>
<Grid.Col span={"auto"}>
<Group align="center" h={"100%"}>
<Text>{e?.User?.Profile?.name}</Text>
</Group>
</Grid.Col>
</Grid>
<Divider/>
<Grid>
<Grid.Col span={"content"}>
<Avatar
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
radius={"xl"}
src={
RouterProfile.api_foto_profile +
e?.User?.Profile?.imagesId
}
/>
</Grid.Col>
<Grid.Col span={"auto"}>
<Group align="center" h={"100%"}>
<Text>{e?.User?.Profile?.name}</Text>
</Group>
</Grid.Col>
</Grid>
<Divider />
</Stack>
))}
</Stack>
@@ -164,6 +165,9 @@ function DetailRiwayat({ listRiwayat }: { listRiwayat: MODEL_EVENT[] }) {
<th>
<Center>Aksi</Center>
</th>
<th>
<Center>Author</Center>
</th>
<th>
<Center>Judul</Center>
</th>

View File

@@ -50,13 +50,13 @@ export default function AdminEvent_Main({
path: RouterAdminEvent.table_review,
color: "orange",
},
{
id: 3,
name: "Draft",
jumlah: countDraft,
path: "",
color: "yellow",
},
// {
// id: 3,
// name: "Draft",
// jumlah: countDraft,
// path: "",
// color: "yellow",
// },
{
id: 4,
name: "Reject",

View File

@@ -72,15 +72,15 @@ function TableStatus({ listPublish }: { listPublish: MODEL_EVENT[] }) {
const TableRows = data.map((e, i) => (
<tr key={i}>
<td>{e.title}</td>
<td>{e.lokasi}</td>
<td>{e.EventMaster_TipeAcara.name}</td>
<td>{e.tanggal.toLocaleString("id-ID", { dateStyle: "full" })}</td>
<td>{e?.Author?.Profile?.name}</td>
<td>{e?.title}</td>
<td>{e?.lokasi}</td>
<td>{e?.EventMaster_TipeAcara?.name}</td>
<td>{e?.tanggal.toLocaleString("id-ID", { dateStyle: "full" })}</td>
<td>
{e.tanggal.toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
hour12: false,
})}
</td>
<td>
@@ -121,28 +121,34 @@ function TableStatus({ listPublish }: { listPublish: MODEL_EVENT[] }) {
<Title order={3}>Daftar Peserta</Title>
</Center>
<Stack>
{peserta?.map((e) => (
<Stack key={e.id} spacing={"xs"}>
<Grid>
<Grid.Col span={"content"}>
<Avatar
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
radius={"xl"}
src={
RouterProfile.api_foto_profile +
e?.User?.Profile?.imagesId
}
/>
</Grid.Col>
<Grid.Col span={"auto"}>
<Group align="center" h={"100%"}>
<Text>{e?.User?.Profile?.name}</Text>
</Group>
</Grid.Col>
</Grid>
<Divider />
</Stack>
))}
{_.isEmpty(peserta) ? (
<Center>
<Text c={"gray"}>Tidak ada peserta</Text>
</Center>
) : (
peserta?.map((e) => (
<Stack key={e.id} spacing={"xs"}>
<Grid>
<Grid.Col span={"content"}>
<Avatar
sx={{ borderStyle: "solid", borderWidth: "0.5px" }}
radius={"xl"}
src={
RouterProfile.api_foto_profile +
e?.User?.Profile?.imagesId
}
/>
</Grid.Col>
<Grid.Col span={"auto"}>
<Group align="center" h={"100%"}>
<Text>{e?.User?.Profile?.name}</Text>
</Group>
</Grid.Col>
</Grid>
<Divider />
</Stack>
))
)}
</Stack>
</Stack>
</Paper>
@@ -163,6 +169,7 @@ function TableStatus({ listPublish }: { listPublish: MODEL_EVENT[] }) {
>
<thead>
<tr>
<th>Author</th>
<th>Judul</th>
<th>Lokasi</th>
<th>Tipe Acara</th>

View File

@@ -90,7 +90,6 @@ function TableStatus({ listReject }: { listReject: MODEL_EVENT[] }) {
{e.tanggal.toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
hour12: false,
})}
</Box>
</td>

View File

@@ -75,7 +75,6 @@ function TableStatus({ listReview }: { listReview: MODEL_EVENT[] }) {
{e.tanggal.toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
hour12: false,
})}
</td>
<td>
@@ -90,7 +89,7 @@ function TableStatus({ listReview }: { listReview: MODEL_EVENT[] }) {
color={"green"}
leftIcon={<IconEyeShare />}
radius={"xl"}
onClick={() => onPublish(e.id, setData)}
onClick={() => onPublish(e.id, setData, e.tanggal)}
>
Publish
</Button>
@@ -194,7 +193,12 @@ function TableStatus({ listReview }: { listReview: MODEL_EVENT[] }) {
);
}
async function onPublish(eventId: string, setData: any) {
async function onPublish(eventId: string, setData: any, tanggal: Date) {
if (moment(tanggal).diff(Date.now(), "minutes") < 0)
return ComponentGlobal_NotifikasiPeringatan(
"Waktu acara telah lewat, Report untuk memberitahu user !"
);
await AdminEvent_funEditStatusPublishById(eventId, "1").then(async (res) => {
if (res.status === 200) {
await AdminEvent_getListTableByStatusId("2").then((res) => {