QC Voting
- # fix - Beranda dan mandatori input ## No issuee
This commit is contained in:
@@ -12,6 +12,7 @@ import { Vote_funEditStatusByStatusId } from "../../fun/edit/fun_edit_status_by_
|
||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||
import { Vote_funDeleteById } from "../../fun/delete/fun_delete_by_id";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
||||
import moment from "moment";
|
||||
|
||||
export default function Vote_DetailDraft({
|
||||
dataVote,
|
||||
@@ -41,7 +42,10 @@ function ButtonAction({
|
||||
|
||||
async function onUpdate() {
|
||||
const hariIni = new Date();
|
||||
if (awalVote < hariIni) return ComponentGlobal_NotifikasiPeringatan("Tanggal Voting Lewat");
|
||||
const cekHari = moment(awalVote).diff(hariIni, "days");
|
||||
|
||||
if (cekHari < 0)
|
||||
return ComponentGlobal_NotifikasiPeringatan("Tanggal Voting Lewat");
|
||||
|
||||
await Vote_funEditStatusByStatusId(voteId, "2").then((res) => {
|
||||
if (res.status === 200) {
|
||||
|
||||
Reference in New Issue
Block a user