list dan detail approval pov apporoval
This commit is contained in:
@@ -117,7 +117,7 @@ export default function Detail() {
|
||||
});
|
||||
}
|
||||
|
||||
const { id } = useParams();
|
||||
const { id, approval } = useParams();
|
||||
|
||||
useEffect(() => {
|
||||
axios
|
||||
@@ -474,14 +474,46 @@ export default function Detail() {
|
||||
>
|
||||
Simpan
|
||||
</LoadingButton> */}
|
||||
<Stack direction="row" spacing={2} sx={{ mt: 6 }}>
|
||||
<Stack direction="row" spacing={2} sx={{ mt: 6 }}>
|
||||
{approval ? (
|
||||
<>
|
||||
<Box sx={{ flexGrow: 1 }} />
|
||||
{/* GRUP TOMBOL DI KANAN */}
|
||||
<Stack direction="row" spacing={1.5} mt={2}>
|
||||
<Button
|
||||
color='error'
|
||||
variant="outlined"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
setDialogSendWa(true);
|
||||
setShareLink(false);
|
||||
}}
|
||||
>
|
||||
Decline
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
variant="contained"
|
||||
size="small"
|
||||
color='primary'
|
||||
onClick={() => {
|
||||
setDialogSendWa(true);
|
||||
setShareLink(true);
|
||||
}}
|
||||
>
|
||||
Approve
|
||||
</Button>
|
||||
</Stack>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{/* TOMBOL SIMPAN DI KIRI */}
|
||||
<LoadingButton
|
||||
type="submit"
|
||||
variant="contained"
|
||||
sx={{ p: 2, backgroundColor: "#19BBBB" }}
|
||||
loading={false}
|
||||
size='small'
|
||||
size="small"
|
||||
>
|
||||
Simpan
|
||||
</LoadingButton>
|
||||
@@ -489,19 +521,36 @@ export default function Detail() {
|
||||
{/* Ini adalah spacer untuk mendorong tombol berikutnya ke kanan */}
|
||||
<Box sx={{ flexGrow: 1 }} />
|
||||
|
||||
{/* GRUP TOMBOL DI KANAN */}
|
||||
<Stack direction="row" spacing={1.5} mt={2}>
|
||||
<Button variant="contained" size="small" sx={{ p: 2, backgroundColor: "#19BBBB" }}
|
||||
onClick={() => {setDialogSendWa(true); setShareLink(false); }}>
|
||||
Kirim (WA Chatbot)
|
||||
</Button>
|
||||
|
||||
<Button variant="contained" size="small" sx={{ p: 2, backgroundColor: "#19BBBB" }}
|
||||
onClick={() => {setDialogSendWa(true); setShareLink(true); }}>
|
||||
Share Link
|
||||
</Button>
|
||||
</Stack>
|
||||
{/* GRUP TOMBOL DI KANAN */}
|
||||
<Stack direction="row" spacing={1.5} mt={2}>
|
||||
<Button
|
||||
variant="contained"
|
||||
size="small"
|
||||
sx={{ p: 2, backgroundColor: "#19BBBB" }}
|
||||
onClick={() => {
|
||||
setDialogSendWa(true);
|
||||
setShareLink(false);
|
||||
}}
|
||||
>
|
||||
Kirim (WA Chatbot)
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
variant="contained"
|
||||
size="small"
|
||||
sx={{ p: 2, backgroundColor: "#19BBBB" }}
|
||||
onClick={() => {
|
||||
setDialogSendWa(true);
|
||||
setShareLink(true);
|
||||
}}
|
||||
>
|
||||
Share Link
|
||||
</Button>
|
||||
</Stack>
|
||||
</>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
</Stack>
|
||||
</FormProvider>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user