|
@@ -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 });
|