Browse Source

menggunakan string pada updatePT is_pengajuan_keberatan

andi 2 năm trước cách đây
mục cha
commit
a98e4fdca9

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

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

+ 2 - 2
components/Riwayat/ChartRadarA.js

@@ -53,9 +53,9 @@ class ChartRadarA extends React.Component {
         const data = await getjumlahStatusLaporan(this.props.token);
         const data = await getjumlahStatusLaporan(this.props.token);
         this.setState((prevState) => ({
         this.setState((prevState) => ({
             ...prevState,
             ...prevState,
-            series: [{ data: data.data.map((e) => e.jumlah_jadwal_evaluasi), name: "penjadwalan Evaluasi" }
+            series: [{ data: data.data.map((e) => e.jumlah_jadwal_evaluasi), name: "Penjadwalan Evaluasi" }
                 , { data: data.data.map((e) => e.jumlah_pemeriksaan), name: "Pemeriksaan" },
                 , { data: data.data.map((e) => e.jumlah_pemeriksaan), name: "Pemeriksaan" },
-            { data: data.data.map((e) => e.jumlah_sanksi), name: "sanksi" }],
+            { data: data.data.map((e) => e.jumlah_sanksi), name: "Sanksi" }],
             options: {
             options: {
                 ...prevState,
                 ...prevState,
                 xaxis: {
                 xaxis: {

+ 2 - 0
pages/app/naik-sanksi/index.js

@@ -23,7 +23,9 @@ class NaikSanksi extends Component {
 		const pelaporan = await getPelaporan(token, { sanksi: true });
 		const pelaporan = await getPelaporan(token, { sanksi: true });
 		const sanksi = await getSanksi(token, { naikSanksi: true, sanksi: true })
 		const sanksi = await getSanksi(token, { naikSanksi: true, sanksi: true })
 		this.setState({ pelaporan, sanksi });
 		this.setState({ pelaporan, sanksi });
+		// this.setState({ pelanggaran: sanksi.data.map((e) => e.pelanggaran) })
 	};
 	};
+	
 
 
 	render() {
 	render() {
 		const { pelaporan, sanksi } = this.state;
 		const { pelaporan, sanksi } = this.state;

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

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

+ 1 - 1
pages/pt/sanksi/index.js

@@ -28,7 +28,7 @@ class Sanksi extends Component {
 						Sanksi
 						Sanksi
 					</span></div>
 					</span></div>
 				<Row>
 				<Row>
-					<Col lg={12}>{sanksi.data?.length ? <TableSanksi listData={sanksi.data} to="/pt/sanksi/detail" toKeberatan="/pt/sanksi/keberatan/detail" toPerbaikan="/pt/dokumen-perbaikan/detail" toJwbKeberatan="/pt/sanksi/jawaban-keberatan/detail" toJwbBanding="/pt/sanksi/jawaban-banding/detail" toJwbBanding2="/pt/sanksi/jawaban-banding/detail" toCabutSanksi="/pt/sanksi/pencabutan-sanksi/detail" toJwbCabutSanksi="/pt/sanksi/jawaban-pencabutan-sanksi/detail" linkName="Detail" /> : sanksi.data ? "Tidak ada Sanksi" : <Loader />}</Col>
+					<Col lg={12}>{sanksi.data?.length ? <TableSanksi listData={sanksi.data} to="/pt/sanksi/detail" toKeberatan="/pt/sanksi/keberatan/detail" toPerbaikan="/pt/sanksi/dokumen-perbaikan/detail" toJwbKeberatan="/pt/sanksi/jawaban-keberatan/detail" toJwbBanding="/pt/sanksi/jawaban-banding/detail" toJwbBanding2="/pt/sanksi/jawaban-banding/detail" toCabutSanksi="/pt/sanksi/pencabutan-sanksi/detail" toJwbCabutSanksi="/pt/sanksi/jawaban-pencabutan-sanksi/detail" linkName="Detail" /> : sanksi.data ? "Tidak ada Sanksi" : <Loader />}</Col>
 				</Row>
 				</Row>
 			</ContentWrapper>
 			</ContentWrapper>
 		);
 		);

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

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

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

@@ -61,7 +61,7 @@ class Keberatan extends Component {
 							const toastid = toast.loading("Please wait...");
 							const toastid = toast.loading("Please wait...");
 							try {
 							try {
 								const { token, query } = this.props;
 								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 });
 								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}`);
 								Router.push(`/pt/sanksi/dokumen-perbaikan/detail?id=${sanksi.data._id}`);
 							} catch (error) {
 							} catch (error) {