Prechádzať zdrojové kódy

is_pengajuan_keberatan/banding : "true/false" use string

andi 2 rokov pred
rodič
commit
f877cc9d8b

+ 1 - 1
components/PT/JawabanKeberatan/ModalPermohonan.js

@@ -104,7 +104,7 @@ export class ModalPermohonan extends Component {
 		const { query, token } = this.props;
 		const getTokenCsrf = await getCsrf();
 		const _csrf = getTokenCsrf.token;
-		await updatePT(token, query.id, { is_pengajuan_banding: true }, _csrf)
+		await updatePT(token, query.id, { is_pengajuan_banding: "true" }, _csrf)
 
 	}
 

+ 3 - 3
pages/pt/sanksi/detail.js

@@ -29,7 +29,7 @@ class Sanksi extends Component {
 		const _csrf = getToken.token;
 		const { token, query } = this.props;
 		const sanksi = await getOneSanksi(token, query.id);
-		updatePT(token, query.id, { is_read: true }, _csrf)
+		updatePT(token, query.id, { is_read: "true" }, _csrf)
 		this.setState({ sanksi, pt: sanksi.data.laporan.pt });
 	};
 	setModal = (modal) => {
@@ -51,7 +51,7 @@ class Sanksi extends Component {
 							const toastid = toast.loading("Please wait...");
 							try {
 								const { token, query } = this.props;
-								await updatePT(token, query.id, { is_pengajuan_keberatan: false }, _csrf)
+								await updatePT(token, query.id, { is_pengajuan_keberatan: "false" }, _csrf)
 								toast.update(toastid, { render: "All is good", type: "success", isLoading: false, autoClose: true, closeButton: true });
 								Router.push(`/pt/sanksi/dokumen-perbaikan/detail?id=${sanksi.data._id}`);
 							} catch (error) {
@@ -109,7 +109,7 @@ class Sanksi extends Component {
 																		const _csrf = getToken.token;
 																		try {
 																			const { token, query } = this.props;
-																			await updatePT(token, query.id, { is_pengajuan_keberatan: true }, _csrf)
+																			await updatePT(token, query.id, { is_pengajuan_keberatan: "true" }, _csrf)
 																			// toast.update(toastid, { render: "Berhasil", type: "success", isLoading: false, autoClose: true, closeButton: true });
 																		} catch (error) {
 																			// toast.update(toastid, { render: "Gagal", type: "error", isLoading: false, autoClose: true, closeButton: true });

+ 1 - 1
pages/pt/sanksi/jawaban-keberatan/detail.js

@@ -65,7 +65,7 @@ class JawabanKeberatan extends Component {
 							const toastid = toast.loading("Please wait...");
 							try {
 								const { token, query } = this.props;
-								await updatePT(token, query.id, { is_pengajuan_banding: false, is_pengajuan_keberatan: false }, _csrf)
+								await updatePT(token, query.id, { is_pengajuan_banding: "false", is_pengajuan_keberatan: "false" }, _csrf)
 								toast.update(toastid, { render: "All is good", type: "success", isLoading: false, autoClose: true, closeButton: true });
 								Router.push("/pt/sanksi");
 							} catch (error) {