| @@ -28,14 +28,9 @@ export default function FileList({ refType, refId, allowDelete, sx, dateHideable | |||||
| }, []); | }, []); | ||||
| const onDeleteClick = (fileId, skey, filename) => () => { | const onDeleteClick = (fileId, skey, filename) => () => { | ||||
| HttpUtils.get( | |||||
| HttpUtils.del( | |||||
| { | { | ||||
| url: UrlUtils.GET_FILE_DELETE, | |||||
| params: { | |||||
| fileId: fileId, | |||||
| skey: skey, | |||||
| filename: filename | |||||
| }, | |||||
| url: `${UrlUtils.GET_FILE_DELETE}/${fileId}/${skey}/${encodeURIComponent(filename)}`, | |||||
| onSuccess: function () { | onSuccess: function () { | ||||
| loadData(); | loadData(); | ||||
| } | } | ||||
| @@ -227,7 +227,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| const markAsNonCreditor = () => { | const markAsNonCreditor = () => { | ||||
| setNonCreditorConfirmPopUp(false); | setNonCreditorConfirmPopUp(false); | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: UrlUtils.GET_ORG_MARK_AS_NON_CREDITOR + "/" + id, | url: UrlUtils.GET_ORG_MARK_AS_NON_CREDITOR + "/" + id, | ||||
| onSuccess: () => { | onSuccess: () => { | ||||
| loadDataFun(); | loadDataFun(); | ||||
| @@ -237,7 +237,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| const sendDn_Overdue = () => { | const sendDn_Overdue = () => { | ||||
| setNonCreditorConfirmPopUp(false); | setNonCreditorConfirmPopUp(false); | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: UrlUtils.GET_SEND_OVERDUE_CREDITOR_LIST + "/" + id, | url: UrlUtils.GET_SEND_OVERDUE_CREDITOR_LIST + "/" + id, | ||||
| onSuccess: (responseData) => { | onSuccess: (responseData) => { | ||||
| setOverduePublicNotice(responseData.overduePublicNotice); | setOverduePublicNotice(responseData.overduePublicNotice); | ||||
| @@ -104,7 +104,7 @@ const ApplicationDetailCard = ({ | |||||
| if (cancellingRef.current) return; | if (cancellingRef.current) return; | ||||
| cancellingRef.current = true; | cancellingRef.current = true; | ||||
| setCancelLoading(true); | setCancelLoading(true); | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: UrlUtils.CANCEL_PROOF + "/" + params.id, | url: UrlUtils.CANCEL_PROOF + "/" + params.id, | ||||
| onSuccess: function (responseData) { | onSuccess: function (responseData) { | ||||
| cancellingRef.current = false; | cancellingRef.current = false; | ||||
| @@ -274,7 +274,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
| setStatusWindowAccepted(false); | setStatusWindowAccepted(false); | ||||
| return; | return; | ||||
| } | } | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: `${SET_PUBLIC_NOTICE_STATUS_PUBLISH}/${params.id}`, | url: `${SET_PUBLIC_NOTICE_STATUS_PUBLISH}/${params.id}`, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| setOpen(false); | setOpen(false); | ||||
| @@ -299,7 +299,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
| const onPaidClick = () => { | const onPaidClick = () => { | ||||
| if (params.id > 0) { | if (params.id > 0) { | ||||
| axios.get(`${SET_PUBLIC_NOTICE_STATUS_PAID}/${params.id}`) | |||||
| axios.post(`${SET_PUBLIC_NOTICE_STATUS_PAID}/${params.id}`) | |||||
| .then((response) => { | .then((response) => { | ||||
| if (response.status === 204) { | if (response.status === 204) { | ||||
| setOpen(false); | setOpen(false); | ||||
| @@ -325,7 +325,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
| const onComplatedClick = () => { | const onComplatedClick = () => { | ||||
| if (params.id > 0) { | if (params.id > 0) { | ||||
| axios.get(`${SET_PUBLIC_NOTICE_STATUS_COMPLATED}/${params.id}`) | |||||
| axios.post(`${SET_PUBLIC_NOTICE_STATUS_COMPLATED}/${params.id}`) | |||||
| .then((response) => { | .then((response) => { | ||||
| if (response.status === 204) { | if (response.status === 204) { | ||||
| setOpen(false); | setOpen(false); | ||||
| @@ -351,7 +351,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
| const onWithdrawnClick = () => { | const onWithdrawnClick = () => { | ||||
| if (params.id > 0) { | if (params.id > 0) { | ||||
| axios.get(`${SET_PUBLIC_NOTICE_STATUS_WITHDRAW}/${params.id}`) | |||||
| axios.post(`${SET_PUBLIC_NOTICE_STATUS_WITHDRAW}/${params.id}`) | |||||
| .then((response) => { | .then((response) => { | ||||
| if (response.status === 204) { | if (response.status === 204) { | ||||
| setOpen(false); | setOpen(false); | ||||
| @@ -421,7 +421,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
| setStatusWindowAccepted(false); | setStatusWindowAccepted(false); | ||||
| return; | return; | ||||
| } | } | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: `${SET_PUBLIC_NOTICE_STATUS_REVOKE}/${params.id}`, | url: `${SET_PUBLIC_NOTICE_STATUS_REVOKE}/${params.id}`, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| setOpen(false); | setOpen(false); | ||||
| @@ -447,7 +447,7 @@ const PublicNoticeDetail_GLD = () => { | |||||
| useEffect(() => { | useEffect(() => { | ||||
| const status = applicationDetailData.data != undefined ? applicationDetailData.data.status : "" | const status = applicationDetailData.data != undefined ? applicationDetailData.data.status : "" | ||||
| if (status === "submitted" && params.id > 0 && getUploadStatus) { | if (status === "submitted" && params.id > 0 && getUploadStatus) { | ||||
| axios.get(`${SET_PUBLIC_NOTICE_STATUS_REVIEWED}/${params.id}`) | |||||
| axios.post(`${SET_PUBLIC_NOTICE_STATUS_REVIEWED}/${params.id}`) | |||||
| .then((response) => { | .then((response) => { | ||||
| if (response.status === 204) { | if (response.status === 204) { | ||||
| setUploadStatus(false); | setUploadStatus(false); | ||||
| @@ -145,7 +145,7 @@ const DashboardDefault = () => { | |||||
| if (params.id > 0) { | if (params.id > 0) { | ||||
| cancellingRef.current = true; | cancellingRef.current = true; | ||||
| setCancelLoading(true); | setCancelLoading(true); | ||||
| axios.get(`${SET_PUBLIC_NOTICE_STATUS_CANCELLED}/${params.id}`) | |||||
| axios.post(`${SET_PUBLIC_NOTICE_STATUS_CANCELLED}/${params.id}`) | |||||
| .then((response) => { | .then((response) => { | ||||
| if (response.status === 204) { | if (response.status === 204) { | ||||
| notifyActionSuccess("取消成功!") | notifyActionSuccess("取消成功!") | ||||
| @@ -264,7 +264,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||||
| }; | }; | ||||
| const onVerifiedClick = () => { | const onVerifiedClick = () => { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: UrlUtils.GET_IND_USER_VERIFY + "/" + formData.id, | url: UrlUtils.GET_IND_USER_VERIFY + "/" + formData.id, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| notifyVerifySuccess() | notifyVerifySuccess() | ||||
| @@ -274,7 +274,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||||
| }; | }; | ||||
| const doLock = () => { | const doLock = () => { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: UrlUtils.GET_USER_LOCK + "/" + formData.id, | url: UrlUtils.GET_USER_LOCK + "/" + formData.id, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| notifyLockSuccess() | notifyLockSuccess() | ||||
| @@ -284,7 +284,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||||
| }; | }; | ||||
| const doUnlock = () => { | const doUnlock = () => { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: UrlUtils.GET_USER_UNLOCK + "/" + formData.id, | url: UrlUtils.GET_USER_UNLOCK + "/" + formData.id, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| notifyActiveSuccess() | notifyActiveSuccess() | ||||
| @@ -130,7 +130,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||||
| const onVerifiedClick = () => { | const onVerifiedClick = () => { | ||||
| if (formik?.values?.orgId) { | if (formik?.values?.orgId) { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: GET_IND_USER_VERIFY + "/" + userData.id, | url: GET_IND_USER_VERIFY + "/" + userData.id, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| notifyVerifySuccess() | notifyVerifySuccess() | ||||
| @@ -148,7 +148,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||||
| setConfirmText("Confirm to Lock this Account?"); | setConfirmText("Confirm to Lock this Account?"); | ||||
| setConfirmAction({ | setConfirmAction({ | ||||
| function: function () { | function: function () { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: GET_USER_LOCK + "/" + userData.id, | url: GET_USER_LOCK + "/" + userData.id, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| notifyLockSuccess() | notifyLockSuccess() | ||||
| @@ -165,7 +165,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||||
| setConfirmAction({ | setConfirmAction({ | ||||
| function: function () { | function: function () { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: GET_USER_UNLOCK + "/" + userData.id, | url: GET_USER_UNLOCK + "/" + userData.id, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| notifyActiveSuccess() | notifyActiveSuccess() | ||||
| @@ -77,7 +77,7 @@ const ManageOrgUserPage = () => { | |||||
| function onActiveClick(params) { | function onActiveClick(params) { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: GET_USER_UNLOCK + "/" + params.row.id, | url: GET_USER_UNLOCK + "/" + params.row.id, | ||||
| onSuccess: () => { | onSuccess: () => { | ||||
| setReloadTime(new Date()); | setReloadTime(new Date()); | ||||
| @@ -117,7 +117,7 @@ const ManageOrgUserPage = () => { | |||||
| const setPrimaryUser = () => { | const setPrimaryUser = () => { | ||||
| setIsWarningPopUp(false) | setIsWarningPopUp(false) | ||||
| HttpUtils.get( | |||||
| HttpUtils.post( | |||||
| { | { | ||||
| url: (!selectUser.row.primaryUser ? GET_SET_PRIMARY_USER : GET_SET_UN_PRIMARY_USER) + "/" + selectUser.row.id, | url: (!selectUser.row.primaryUser ? GET_SET_PRIMARY_USER : GET_SET_UN_PRIMARY_USER) + "/" + selectUser.row.id, | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| @@ -37,7 +37,7 @@ export default function UserTable({searchCriteria, applyGridOnReady,applySearch} | |||||
| } | } | ||||
| const doLock = (id) => { | const doLock = (id) => { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: GET_USER_LOCK+"/"+id, | url: GET_USER_LOCK+"/"+id, | ||||
| onSuccess: function(){ | onSuccess: function(){ | ||||
| //setChangeLocked(true) | //setChangeLocked(true) | ||||
| @@ -48,7 +48,7 @@ export default function UserTable({searchCriteria, applyGridOnReady,applySearch} | |||||
| }; | }; | ||||
| const doUnlock = (id) => { | const doUnlock = (id) => { | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: GET_USER_UNLOCK+"/"+id, | url: GET_USER_UNLOCK+"/"+id, | ||||
| onSuccess: function(){ | onSuccess: function(){ | ||||
| //setChangeLocked(true) | //setChangeLocked(true) | ||||
| @@ -61,7 +61,7 @@ const Mail = () => { | |||||
| }); | }); | ||||
| const setReminderDate=()=>{ | const setReminderDate=()=>{ | ||||
| HttpUtils.get({ | |||||
| HttpUtils.post({ | |||||
| url: apiPath + "/demandNote/set-expect-reminder", | url: apiPath + "/demandNote/set-expect-reminder", | ||||
| onSuccess: function () { | onSuccess: function () { | ||||
| setResponsText("Success"); | setResponsText("Success"); | ||||
| @@ -29,11 +29,11 @@ export const GLD_USER_PROFILE_PATH = apiPath+'/user/gldProfile'; | |||||
| export const GET_AUTH_LIST = '/user/auth/combo'; | export const GET_AUTH_LIST = '/user/auth/combo'; | ||||
| export const GET_USER_COMBO_LIST = '/user/combo'; | export const GET_USER_COMBO_LIST = '/user/combo'; | ||||
| export const GET_USER_GLD_COMBO_LIST = '/user/combo/gld'; | export const GET_USER_GLD_COMBO_LIST = '/user/combo/gld'; | ||||
| export const GET_USER_LOCK = apiPath+'/user/lock'; | |||||
| export const GET_USER_UNLOCK = apiPath+'/user/unlock'; | |||||
| export const GET_USER_LOCK = apiPath+'/user/lock'; //POST | |||||
| export const GET_USER_UNLOCK = apiPath+'/user/unlock'; //POST | |||||
| export const GET_IND_USER_PATH = apiPath+'/user/ind'; | export const GET_IND_USER_PATH = apiPath+'/user/ind'; | ||||
| export const GET_IND_USER_VERIFY = apiPath+'/user/verify'; | |||||
| export const GET_IND_USER_VERIFY = apiPath+'/user/verify'; //POST | |||||
| export const POST_IND_USER = apiPath+'/user/ind'; | export const POST_IND_USER = apiPath+'/user/ind'; | ||||
| export const GET_ORG_USER_PATH = apiPath+'/user/org'; | export const GET_ORG_USER_PATH = apiPath+'/user/org'; | ||||
| @@ -51,10 +51,10 @@ export const POST_ORG_SAVE_PATH = apiPath+'/org/save'; | |||||
| export const GET_ORG_COMBO = apiPath+'/org/combo'; | export const GET_ORG_COMBO = apiPath+'/org/combo'; | ||||
| export const GET_ORG_CHECK_CREDITOR = apiPath+'/org/check-creditor'; | export const GET_ORG_CHECK_CREDITOR = apiPath+'/org/check-creditor'; | ||||
| export const GET_ORG_MARK_AS_CREDITOR = apiPath+'/org/mark-as-creditor'; | export const GET_ORG_MARK_AS_CREDITOR = apiPath+'/org/mark-as-creditor'; | ||||
| export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor'; | |||||
| export const GET_SEND_TERMINATION_OF_CREDIT = apiPath+'/org/sendDn_terminationOfCredit'; | |||||
| export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor'; //POST | |||||
| export const GET_SEND_TERMINATION_OF_CREDIT = apiPath+'/org/sendDn_terminationOfCredit'; //POST | |||||
| export const GET_ORG_EXPORT = apiPath+'/org/export'; | export const GET_ORG_EXPORT = apiPath+'/org/export'; | ||||
| export const GET_SEND_OVERDUE_CREDITOR_LIST = apiPath+'/org/sendDn_OverdueCreditorList'; | |||||
| export const GET_SEND_OVERDUE_CREDITOR_LIST = apiPath+'/org/sendDn_OverdueCreditorList'; //POST | |||||
| //public | //public | ||||
| export const GET_PUB_ORG_PATH = apiPath+'/org/pub'; | export const GET_PUB_ORG_PATH = apiPath+'/org/pub'; | ||||
| @@ -79,7 +79,7 @@ export const CHECK_OVERDUE = apiPath+'/application/check-overdue'; | |||||
| export const FILE_UP_POST = apiPath+'/file/ul'; | export const FILE_UP_POST = apiPath+'/file/ul'; | ||||
| export const FILE_DOWN_GET = apiPath+"/file/dl"; | export const FILE_DOWN_GET = apiPath+"/file/dl"; | ||||
| export const POST_FILE_LIST = apiPath+'/file/list'; | export const POST_FILE_LIST = apiPath+'/file/list'; | ||||
| export const GET_FILE_DELETE = apiPath+'/file/delete'; | |||||
| export const GET_FILE_DELETE = apiPath+'/file/delete'; //DELETE /{fileId}/{skey}/{filename} | |||||
| //export const FILE_DOWN_GET = ({id,skey,filename})=>{ return apiPath+'/file/dl/'+id+'/'+skey+'/'+filename}; | //export const FILE_DOWN_GET = ({id,skey,filename})=>{ return apiPath+'/file/dl/'+id+'/'+skey+'/'+filename}; | ||||
| export const DR_EXPORT = apiPath+'/settings/dr/export'; | export const DR_EXPORT = apiPath+'/settings/dr/export'; | ||||
| @@ -120,8 +120,8 @@ export const PATCH_CHANGE_PASSWORD = apiPath+'/user/change-password'; | |||||
| //Public | //Public | ||||
| export const GET_PUBLIC_ORG_USER_LIST = apiPath+'/user/listOrg'; | export const GET_PUBLIC_ORG_USER_LIST = apiPath+'/user/listOrg'; | ||||
| export const GET_SET_PRIMARY_USER = apiPath+'/user/primary'; | |||||
| export const GET_SET_UN_PRIMARY_USER = apiPath+'/user/un-primary'; | |||||
| export const GET_SET_PRIMARY_USER = apiPath+'/user/primary'; //POST | |||||
| export const GET_SET_UN_PRIMARY_USER = apiPath+'/user/un-primary'; //POST | |||||
| export const GET_PUBLIC_NOTICE_LIST = apiPath+'/application/list'; | export const GET_PUBLIC_NOTICE_LIST = apiPath+'/application/list'; | ||||
| export const GET_PUBLIC_NOTICE_LIST_ListByStatus = apiPath+'/application/status-list'; | export const GET_PUBLIC_NOTICE_LIST_ListByStatus = apiPath+'/application/status-list'; | ||||
| @@ -175,7 +175,7 @@ export const GET_PROOF = apiPath+'/proof/details';//GET | |||||
| export const REPLY_PROOF = apiPath+'/proof/reply';//GET | export const REPLY_PROOF = apiPath+'/proof/reply';//GET | ||||
| export const PROOF_CHECK_PRICE = apiPath+'/proof/check-price';//GET | export const PROOF_CHECK_PRICE = apiPath+'/proof/check-price';//GET | ||||
| export const GET_PROOF_PAY = apiPath+'/proof/pay-details';//GET | export const GET_PROOF_PAY = apiPath+'/proof/pay-details';//GET | ||||
| export const CANCEL_PROOF = apiPath+'/proof/cancel';//GET | |||||
| export const CANCEL_PROOF = apiPath+'/proof/cancel';//POST | |||||
| //payment | //payment | ||||
| export const PAYMENT_CREATE = apiPath+'/payment/create';//POST | export const PAYMENT_CREATE = apiPath+'/payment/create';//POST | ||||
| @@ -34,6 +34,14 @@ export const patch = ({ url, params, onSuccess, onFail, onError }) => { | |||||
| }); | }); | ||||
| }; | }; | ||||
| export const del = ({ url, params, onSuccess, onFail, onError }) => { | |||||
| axios.delete(url, { params }).then( | |||||
| (response) => { onResponse(response, onSuccess, onFail); } | |||||
| ).catch(error => { | |||||
| return handleError(error, onError); | |||||
| }); | |||||
| }; | |||||
| export const post = ({ url, params, onSuccess, onFail, onError, headers }) => { | export const post = ({ url, params, onSuccess, onFail, onError, headers }) => { | ||||
| headers = headers ? headers : { | headers = headers ? headers : { | ||||
| "Content-Type": "application/json" | "Content-Type": "application/json" | ||||