index.js 43.5 KB
Newer Older
d.arizona's avatar
d.arizona committed
1 2
// a library to wrap and simplify api calls
import apisauce from 'apisauce'
d.arizona's avatar
d.arizona committed
3
import Constant from '../library/Constant'
d.arizona's avatar
d.arizona committed
4 5

// our "constructor"
Deni Rinaldi's avatar
Deni Rinaldi committed
6 7
const create = (type = "") => {
  let api;
d.arizona's avatar
d.arizona committed
8 9 10 11 12 13
  // ------
  // STEP 1
  // ------
  //
  // Create and configure an apisauce-based api object.
  //
d.arizona's avatar
d.arizona committed
14
  const baseURL = `${process.env.REACT_APP_URL_MAIN_BE}/public/`
Deni Rinaldi's avatar
Deni Rinaldi committed
15 16 17 18 19 20 21 22 23 24 25 26
  switch (type) {
    case '':
      api = apisauce.create({
        // base URL is read from the "constructor"
        baseURL,
        // here are some default headers
        headers: {
          'Cache-Control': 'no-cache',
          Accept: 'application/json',
          'Content-Type': 'application/json',
        },
        // 60 second timeout...
Riri Novita's avatar
Riri Novita committed
27
        timeout: 180000
Deni Rinaldi's avatar
Deni Rinaldi committed
28 29 30 31 32 33 34 35 36 37 38 39 40
      })
      break;
    case 'UPLOAD':
      api = apisauce.create({
        // base URL is read from the "constructor"
        baseURL,
        // here are some default headers
        headers: {
          'Cache-Control': 'no-cache',
          Accept: 'application/json',
          'Content-Type': 'application/json',
        },
        // 40 second timeout...
Riri Novita's avatar
Riri Novita committed
41
        timeout: 180000
Deni Rinaldi's avatar
Deni Rinaldi committed
42 43 44 45 46
      })
      break;
    default:
      break;
  }
d.arizona's avatar
d.arizona committed
47 48 49 50

  api.addAsyncRequestTransform(request => async () => {
    var token
    try {
d.arizona's avatar
d.arizona committed
51
      const res = await localStorage.getItem(Constant.TOKEN)
EKSAD's avatar
EKSAD committed
52
      if (token != null) {
d.arizona's avatar
d.arizona committed
53
        token = res
d.arizona's avatar
d.arizona committed
54 55 56
        // alert(url)
        // api.setBaseURL(`${url}/api/`)
      } else {
d.arizona's avatar
d.arizona committed
57
        token = res
d.arizona's avatar
d.arizona committed
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
        // url = Constant.BASE_URL.MASTER + '/api/'
        // alert(url)
        // api.setBaseURL(`${url}/api/`)
      }
    } catch (error) {
      // console.tron.log(error)
    }
    // console.log(token)
    request.headers['token'] = token
    // console.tron.log(url)
  })

  // ------
  // STEP 2
  // ------
  //
  // Define some functions that call the api.  The goal is to provide
  // a thin wrapper of the api layer providing nicer feeling functions
  // rather than "get", "post" and friends.
  //
  // I generally don't like wrapping the output at this level because
  // sometimes specific actions need to be take on `403` or `401`, etc.
  //
  // Since we can't hide from that, we embrace it by getting out of the
  // way at this level.
  //
  const getRoot = () => api.get('')
EKSAD's avatar
EKSAD committed
85 86

  //Auth
EKSAD's avatar
EKSAD committed
87
  const login = (body) => api.post('auth/login', body)
EKSAD's avatar
EKSAD committed
88
  const resetPassword = (body) => api.post('auth/reset_password', body)
EKSAD's avatar
EKSAD committed
89
  const verification = (body) => api.post('email/reset_password', body)
EKSAD's avatar
EKSAD committed
90
  const isResetPassword = (userId) => api.post(`auth/is_reset_password/${userId}`)
Deni Rinaldi's avatar
Deni Rinaldi committed
91

d.arizona's avatar
d.arizona committed
92 93
  //Role
  const getRole = () => api.get('role/get_all_role')
94
  const getRoleActive = () => api.get('role/get_all_role_active')
d.arizona's avatar
d.arizona committed
95
  const getDetailRole = (roleId) => api.get(`role/get_role_by_id/${roleId}`)
d.arizona's avatar
d.arizona committed
96
  const searchRole = (body) => api.post('/role/search_role', body)
d.arizona's avatar
d.arizona committed
97 98 99
  const addRole = (body) => api.post('role/create_role', body)
  const editRole = (body) => api.post('role/update_role', body)
  const deleteRole = (roleId) => api.post(`role/delete_role/${roleId}`)
d.arizona's avatar
d.arizona committed
100 101 102

  //Menu
  const getMenu = () => api.get('menu/get_menu_hierarki')
d.arizona's avatar
d.arizona committed
103
  const getMenuByRole = () => api.get('menu/get_menu_hierarki_by_role')
104
  const getMenuByUser = () => api.get('menu/get_menu')
Deni Rinaldi's avatar
Deni Rinaldi committed
105
  const getPermission = (body) => api.post('permission/get_permission', body)
106 107 108

  //UNIT BISNIS
  const getUnitBisnis = () => api.get('business_unit/get_all_business_unit')
Deni Rinaldi's avatar
Deni Rinaldi committed
109 110
  const createUnitBisnis = (body) => api.post('/business_unit/create_business_unit', body)
  const updateUnitBisnis = (body) => api.post('/business_unit/update_business_unit', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
111
  const searchUnitBisnis = (body) => api.post('/business_unit/search_business_unit', body)
Deni Rinaldi's avatar
1  
Deni Rinaldi committed
112
  const checkUploadUnitBisnis = (body) => api.post('/business_unit/check_import', body)
113
  const uploadUnitBisnis = (body) => api.post('/business_unit/import_business_unit', body)
114
  const getUnitBisnisActive = () => api.get('business_unit/get_all_business_unit_active')
115
  const getDetailUnitBisnis = (id) => api.get(`business_unit/get_business_unit_by_id/${id}`)
Deni Rinaldi's avatar
Deni Rinaldi committed
116
  const deleteUnitBisnis = (id) => api.post(`business_unit/delete_business_unit/${id}`)
117

faisalhamdi's avatar
faisalhamdi committed
118
  // Perusahaan
faisalhamdi's avatar
faisalhamdi committed
119
  const getPerusahaan = () => api.get('company/get_all_company')
EKSAD's avatar
EKSAD committed
120
  const getPerusahaanActive = () => api.get('company/get_all_company_active')
faisalhamdi's avatar
faisalhamdi committed
121 122
  const createPerusahaan = (body) => api.post('/company/create_company', body)
  const updatePerusahaan = (body) => api.post('/company/update_company', body)
d.arizona's avatar
d.arizona committed
123
  const getPerusahaanHierarki = () => api.get('company/get_company_hierarki')
d.arizona's avatar
d.arizona committed
124
  const saveVisualisasiPerusahaan = (body) => api.post('company/save_visualization', body)
125 126 127 128
  const checkUploadPerusahaan = (body) => api.post('company/check_import', body)
  const getDetailPerusahaan = (id) => api.get(`company/get_company_by_id/${id}`)
  const uploadPerusahaan = (body) => api.post('company/import_company', body)
  const searchPerusahaan = (body) => api.post('company/search_company', body)
faisalhamdi's avatar
faisalhamdi committed
129
  const deletePerusahaan = (id) => api.post(`company/delete_company/${id}`)
faisalhamdi's avatar
faisalhamdi committed
130

131 132
  // APPROVAL MATRIX
  const getAM = () => api.get('approval_matrix/get_all_approval_matrix')
133
  const getApprovedByAM = () => api.get('approval_matrix/get_all_approver')
134 135
  const getTypeAM = () => api.get('approval_type/get_all_approval_type')
  const getOperatorAM = () => api.get('operator_type/get_all_operator_type')
136
  const getDetailAM = (id) => api.get(`approval_matrix/get_approval_matrix_by_id/${id}`)
137
  const searchAM = (body) => api.post('/approval_matrix/search_approval_matrix', body)
138 139
  const createAM = (body) => api.post('/approval_matrix/create_approval_matrix', body)
  const updateAM = (body) => api.post('/approval_matrix/update_approval_matrix', body)
d.arizona's avatar
d.arizona committed
140 141
  const updateVAM = (body) => api.post('/approval_matrix/save_visualization', body)
  const checkUploadAM = (body) => api.post('/approval_matrix/check_import', body)
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
142
  const uploadAM = (body) => api.post('approval_matrix/import_approval_matrix', body)
143
  const deleteAM = (id) => api.post(`approval_matrix/delete_approval_matrix/${id}`)
144

d.arizona's avatar
d.arizona committed
145 146 147 148
  //User
  const getUser = () => api.get('user/get_all_user')
  const getDetailUser = (userId) => api.get(`user/get_user_by_id/${userId}`)
  const searchUser = (body) => api.post('user/search_user', body)
d.arizona's avatar
d.arizona committed
149 150
  const createUser = (body) => api.post('user/create_user', body)
  const updateUser = (body) => api.post('user/update_user', body)
d.arizona's avatar
d.arizona committed
151
  const deleteUser = (userId) => api.post(`user/delete_user/${userId}`)
152
  const changePassword = (body) => api.post('/user/change_password', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
153 154 155
  const checkUploadUser = (body) => api.post('/user/check_import', body)
  const uploadUser = (body) => api.post('/user/import_user', body)

EKSAD's avatar
EKSAD committed
156 157
  //Report Items
  const getReportItems = () => api.get('item_report/get_all_item_report')
a.bairuha's avatar
a.bairuha committed
158
  const getInputType = () => api.get('type_item_report/get_all_type_item_report')
EKSAD's avatar
EKSAD committed
159
  const getReportType = () => api.get('report/get_all_report')
EKSAD's avatar
EKSAD committed
160
  const getDetailReportItems = (userId) => api.get(`item_report/get_item_report_by_id/${userId}`)
EKSAD's avatar
EKSAD committed
161
  const searchReportItems = (body) => api.post('/item_report/search_item_report', body)
EKSAD's avatar
EKSAD committed
162
  const createReportItems = (body) => api.post('/item_report/create_item_report', body)
EKSAD's avatar
EKSAD committed
163
  const updateReportItems = (body) => api.post('/item_report/update_item_report', body)
EKSAD's avatar
EKSAD committed
164 165
  const checkUploadReportItems = (body) => api.post('/item_report/check_import', body)
  const uploadReportItems = (body) => api.post('/item_report/import_item_report', body)
d.arizona's avatar
d.arizona committed
166
  const getItemReportHierarki = (body) => api.post('item_report/get_item_report_hierarki', body)
d.arizona's avatar
d.arizona committed
167
  const saveVisualisasiReport = (body) => api.post('item_report/save_visualization', body)
d.arizona's avatar
d.arizona committed
168
  const getReportParent = (body) => api.post('item_report/get_parent_item_report', body)
a.bairuha's avatar
a.bairuha committed
169
  const deleteReportItems = (id) => api.post(`item_report/delete_item_report/${id}`)
Deni Rinaldi's avatar
Deni Rinaldi committed
170
  const getAllSettingByType = (body) => api.post('setting/get_all_setting_by_type', body)
d.arizona's avatar
d.arizona committed
171 172
  const createAllItemReport = (body) => api.post('item_report/create_all_item_report', body)
  const deleteAllItemReport = (body) => api.post('/item_report/delete_all_item_report', body)
d.arizona's avatar
d.arizona committed
173
  const deleteAllItemReportLOCF = (body) => api.post('/item_report/delete_all_item_report_locf', body)
EKSAD's avatar
EKSAD committed
174

175 176 177 178
  //PARAMETER
  const getAllParameter = () => api.get('/setting/get_all_setting')
  const getDetailParameter = (id) => api.get(`setting/get_setting_by_id/${id}`)
  const getAllGroup = () => api.get('/setting_group/get_all_setting_group')
Deni Rinaldi's avatar
Deni Rinaldi committed
179
  const getParameterByGroup = (groupID) => api.get(`/setting_type/get_all_setting_type_by_group/${groupID}`)
d.arizona's avatar
d.arizona committed
180
  const getParameterByGroupName = (groupName) => api.post(`/setting/get_all_setting_by_group_name`, groupName)
181 182
  const createParameter = (body) => api.post('setting/create_setting', body)
  const updateParameter = (body) => api.post('setting/update_setting', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
183 184
  const checkUploadParameter = (body) => api.post('setting/check_import', body)
  const uploadParameter = (body) => api.post('/setting/import_setting', body)
185
  const searchParameter = (body) => api.post('setting/search_setting', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
186
  const deleteParameter = (id) => api.post(`setting/delete_setting/${id}`)
Deni Rinaldi's avatar
Deni Rinaldi committed
187

rifkaki's avatar
rifkaki committed
188
  // MASTER DATA - CAT
189
  const getAllMasterDataCat = () => api.get('item_report_company/get_all_item_report_company')
rifkaki's avatar
rifkaki committed
190
  const getParentItemReport = (body) => api.post('item_report/get_parent_item_report_default', body)
191
  const saveMasterDataCat = (body) => api.post('item_report_company/create_item_report_company', body)
faisalhamdi's avatar
faisalhamdi committed
192 193 194
  const getDetailMasterDataCat = (idCompany, years) => api.get(`item_report_company/get_item_report_company_by_company_id_years/${idCompany}/${years}`)
  const deleteMasterDataCat = (idCompany, years) => api.post(`item_report_company/delete_item_report_company/${idCompany}/${years}`)
  const updateMasterDataCat = (body) => api.post('item_report_company/update_item_report_company', body)
rifkaki's avatar
rifkaki committed
195

196
  //Transaction
d.arizona's avatar
d.arizona committed
197 198 199 200
  const getReportTypeBody = (body) => api.post('transaction/master_budget/get_all_report', body)
  const getMasterBudgetAtt = (body) => api.post('transaction/master_budget/get_report_attachment', body)
  const uploadAttachment = (body) => api.post('transaction/master_budget/upload_attachment', body)
  const getRevision = (body) => api.post('transaction/master_budget/get_revision', body)
201
  const getPeriodeTransaction = () => api.get('transaction/get_periode')
Deni Rinaldi's avatar
Deni Rinaldi committed
202
  const getMonthTransaction = () => api.get('transaction/get_default_month')
d.arizona's avatar
d.arizona committed
203
  const deleteAttachment = (id) => api.post(`transaction/master_budget/delete_attachment/${id}`)
Deni Rinaldi's avatar
Deni Rinaldi committed
204
  const getDetailReportMB = (body) => api.post('/transaction/master_budget/get_report_hierarki', body)
205
  const getLastestUpdateMB = (body) => api.post('/transaction/master_budget/get_latest_update', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
206
  const createSubmitReport = (body) => api.post('transaction/master_budget/create_submission_report', body)
a.bairuha's avatar
a.bairuha committed
207
  const getSubmission = (body) => api.post('transaction/master_budget/get_submission_id', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
208
  const checkUploadMB = (body) => api.post('transaction/master_budget/check_import', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
209
  const uploadMasterBudget = (body) => api.post('transaction/master_budget/import_master_budget', body)
d.arizona's avatar
d.arizona committed
210
  const validateSubmitReport = (body) => api.post('transaction/master_budget/validate_save', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
211
  const countingFormula = (body) => api.post('transaction/counting_formula', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
212
  const submitMasterBudget = (body) => api.post('transaction/master_budget/submit_master_budget', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
213
  const checkIsSubmit = (body) => api.post('transaction/master_budget/is_can_submit', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
214
  const checkApprover = () => api.get('transaction/master_budget/is_approver')
Deni Rinaldi's avatar
Deni Rinaldi committed
215
  const approvalSubmission = (body) => api.post('transaction/master_budget/approval_submission', body)
d.arizona's avatar
d.arizona committed
216
  const getCompanySubmitted = (body) => api.post('transaction/master_budget/get_company_submitted', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
217
  const getLastPeriod = (idCompany) => api.get(`transaction/master_budget/get_last_periode/${idCompany}`)
Deni Rinaldi's avatar
Deni Rinaldi committed
218
  const getSubmitMasterBudget = (body) => api.post('transaction/master_budget/get_latest_periode_submit', body)
d.arizona's avatar
d.arizona committed
219
  const getSubmitMonthlyReport = (body) => api.post('transaction/monthly_report/get_latest_periode_submit', body)
d.arizona's avatar
d.arizona committed
220
  const createPeriodeRevision = (body) => api.post('transaction/master_budget/create_periode_revision', body)
d.arizona's avatar
d.arizona committed
221
  const getIdDeleteFromExcel = (body) => api.post('transaction/master_budget/delete_from_excel', body)
d.arizona's avatar
d.arizona committed
222
  const getIdDeleteFromExcelLOCF = (body) => api.post('transaction/locf/monthly_report/delete_from_excel', body)
d.arizona's avatar
d.arizona committed
223 224
  const getDashboard = (body) => api.get('transaction/get_dashboard')
  const historyApproval = (body) => api.post('transaction/master_budget/history_approval', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
225
  const getDashboardUser = () => api.get('transaction/get_dashboard_sub_co')
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
226
  const getDashboardMB = (body) => api.get('transaction/get_dashboard_table')
rifkaki's avatar
rifkaki committed
227 228
  const getReportHierarkiFRMB = (body) => api.post('transaction/db_ratio/master_budget/get_report_hierarki', body)
  const getReportHierarkiFRMR = (body) => api.post('transaction/db_ratio/monthly_report/get_report_hierarki', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
229
  const getDetailHierarkiCF = (body) => api.post('transaction/master_budget/get_report_hierarki_cashflow', body)
d.arizona's avatar
d.arizona committed
230 231

  const getOpetratingIndID = (body) => api.post('transaction/operating_indicator/get_operating_indicator_id', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
232
  const getSubmitOI = (body) => api.post('transaction/operating_indicator/get_latest_periode_submit', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
233
  const getLastPeriodOI = (idCompany) => api.get(`transaction/operating_indicator/get_last_periode/${idCompany}`)
d.arizona's avatar
d.arizona committed
234
  const getAllOperatingInd = (body) => api.post('transaction/operating_indicator/get_all_report', body)
Riri Novita's avatar
Riri Novita committed
235 236 237 238
  const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/master_budget/get_report_hierarki', body)
  const createOpetaingInd = (body) => api.post('transaction/operating_indicator/master_budget/create_submission_report', body)
  const checkUploadOperatingInd = (body) => api.post('transaction/operating_indicator/master_budget/check_import', body)
  const uploadOperatingInd = (body) => api.post('transaction/operating_indicator/master_budget/import_master_budget', body)
d.arizona's avatar
d.arizona committed
239
  const getLastestUpdateOI = (body) => api.post('transaction/operating_indicator/get_latest_update', body)
d.arizona's avatar
d.arizona committed
240
  const getLastPeriodeOI = (idCompany) => api.post(`transaction/master_budget/get_last_periode/${idCompany}`)
Riri Novita's avatar
Riri Novita committed
241 242
  const getReportHierarkiPL = (body) => api.post('transaction/db_profit_loss_detail/get_report_hierarki', body)
  const getLastestUpdateMROI = (body) => api.post('transaction/operating_indicator/monthly_report/get_latest_update', body)
r.kurnia's avatar
r.kurnia committed
243

Riri Novita's avatar
Riri Novita committed
244
  // Rolling Outlook
d.arizona's avatar
d.arizona committed
245
  const getRollingOutlookID = (body) => api.post('transaction/rolling_outlook/get_rolling_outlook_id', body)
d.arizona's avatar
d.arizona committed
246 247 248 249 250 251
  const getRollingOutlookAttachment = (body) => api.post('transaction/rolling_outlook/get_report_attachment', body)
  const uploadRollingOutlookAttachment = (body) => api.post('transaction/rolling_outlook/upload_attachment', body)
  const deleteRollingOutlookAttachment = (body) => api.post(`transaction/rolling_outlook/delete_attachment/${body}`)
  const getRollingOutlookReport = (body) => api.post('transaction/rolling_outlook/get_all_report', body)
  const getRollingOutlookLastUpdate = (body) => api.post('transaction/rolling_outlook/get_latest_update', body)
  const getRollingOutlookRevision = (body) => api.post('transaction/rolling_outlook/get_revision', body)
d.arizona's avatar
d.arizona committed
252
  const getRollingOutlookIsApprover = (body) => api.get('transaction/rolling_outlook/is_approver', body)
rifkaki's avatar
rifkaki committed
253 254
  const uploadAttachmentRO = (body) => api.post('transaction/rolling_outlook/upload_attachment', body)
  const deleteAttachmentRO = (id) => api.post(`transaction/rolling_outlook/delete_attachment/${id}`)
d.arizona's avatar
d.arizona committed
255 256 257
  const approvalRolling = (body) => api.post('transaction/rolling_outlook/approval_rolling', body)
  const createPeriodeRevisionRO = (body) => api.post('transaction/rolling_outlook/create_periode_revision', body)
  const historyApprovalRO = (body) => api.post('transaction/rolling_outlook/history_approval', body)
rifkaki's avatar
rifkaki committed
258

259
  const getRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
260 261
  const checkImportRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/check_import', body)
  const importRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/import_rolling_outlook', body)
rifkaki's avatar
rifkaki committed
262
  const createRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/create_rolling_outlook', body)
Riri Novita's avatar
Riri Novita committed
263
  const getRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
264 265 266
  const createRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/create_rolling_outlook', body)
  const checkImportRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/check_import', body)
  const importRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/import_rolling_outlook', body)
r.kurnia's avatar
r.kurnia committed
267 268
  const getRollingOutlookTP = (body) => api.post('transaction/tax_planning/rolling_outlook/get_report_hierarki', body)
  const createRollingOutlookTP = (body) => api.post('transaction/tax_planning/rolling_outlook/create_rolling_outlook', body)
r.kurnia's avatar
r.kurnia committed
269 270
  const checkImportRollingOutlookTP = (body) => api.post('transaction/tax_planning/rolling_outlook/check_import', body)
  const importRollingOutlookTP = (body) => api.post('transaction/tax_planning/rolling_outlook/import_rolling_outlook', body)
faisalhamdi's avatar
faisalhamdi committed
271
  const getRollingOutlookCAT = (body) => api.post('transaction/cat/rolling_outlook/get_report_hierarki', body)
faisalhamdi's avatar
faisalhamdi committed
272 273 274
  const createRollingOutlookCAT = (body) => api.post('transaction/cat/rolling_outlook/create_rolling_outlook', body)
  const checkImportRollingOutlookCAT = (body) => api.post('transaction/cat/rolling_outlook/check_import', body)
  const importRollingOutlookCAT = (body) => api.post('transaction/cat/rolling_outlook/import_rolling_outlook', body)
d.arizona's avatar
d.arizona committed
275
  const getSubmitRollingOutlook = (body) => api.post('transaction/rolling_outlook/get_latest_periode_submit', body)
Riri Novita's avatar
Riri Novita committed
276 277
  const getRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_operating_indicator_id', body)
  const getHierarkiRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
278
  const createRollingOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/create_rolling_outlook', body)
Riri Novita's avatar
Riri Novita committed
279
  const getLastestUpdateROOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/get_latest_update', body)
Riri Novita's avatar
Riri Novita committed
280
  const checkUploadRollingOutlookOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/check_import', body)
Riri Novita's avatar
Riri Novita committed
281
  const uploadRollingOutlookOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/import_rolling_outlook', body)
d.arizona's avatar
d.arizona committed
282
  const submitRollingOutlook = (body) => api.post('transaction/rolling_outlook/submit_rolling_outlook', body)
d.arizona's avatar
d.arizona committed
283
  const getRollingOutlookCompanySubmitted = (body) => api.post('transaction/rolling_outlook/get_company_submitted', body)
Riri Novita's avatar
Riri Novita committed
284
  const getRollingOutlookCF = (body) => api.post('transaction/cash_flow/rolling_outlook/get_report_hierarki', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
285
  const createRollingOutlookCF = (body) => api.post('transaction/cash_flow/rolling_outlook/create_rolling_outlook', body)
d.arizona's avatar
d.arizona committed
286

d.arizona's avatar
d.arizona committed
287
  //REPORT NEW
288
  const getAllReportBS = (body) => api.post('/transaction/db_balance_sheet/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
289 290
  const getReportBSMB = (body) => api.post('/transaction/db_balance_sheet/master_budget/get_report_hierarki', body)
  const getReportBSMR = (body) => api.post('/transaction/db_balance_sheet/monthly_report/get_report_hierarki', body)
291
  const getAllReportPLDetail = (body) => api.post('/transaction/db_profit_loss_detail/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
292 293
  const getReportPLDetailMB = (body) => api.post('/transaction/db_profit_loss_detail/master_budget/get_report_hierarki', body)
  const getReportPLDetailMR = (body) => api.post('/transaction/db_profit_loss_detail/monthly_report/get_report_hierarki', body)
294
  const getReportPL = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
295
  const getReportFR = (body) => api.post('/transaction/db_ratio/get_report_hierarki', body)
296 297 298 299
  const getHierarkiCreateReportPLMB = (body) => api.post('/transaction/db_profit_loss/master_budget/get_report_hierarki', body)
  const getHierarkiCreateReportPLMR = (body) => api.post('/transaction/db_profit_loss/monthly_report/get_report_hierarki', body)
  const createReportPLMB = (body) => api.post('/transaction/db_profit_loss/master_budget/create_submission_report', body)
  const createReportPLMR = (body) => api.post('/transaction/db_profit_loss/monthly_report/create_monthly_report', body)
Riri Novita's avatar
Riri Novita committed
300
  const getPLID = (body) => api.post('/transaction/db_profit_loss/get_profit_loss_id', body)
301 302
  const getHierarkiCreateReportFRMB = (body) => api.post('/transaction/db_ratio/master_budget/get_report_hierarki', body)
  const getHierarkiCreateReportFRMR = (body) => api.post('/transaction/db_ratio/monthly_report/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
303
  const getFRID = (body) => api.post('/transaction/db_ratio/get_ratio_id', body)
304 305
  const createReportFRMB = (body) => api.post('/transaction/db_ratio/master_budget/create_submission_report', body)
  const createReportFRMR = (body) => api.post('/transaction/db_ratio/monthly_report/create_monthly_report', body)
306 307
  // const getReportPLMB = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
  // const getReportPLMB = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
308
  const getReportPLMR = (body) => api.post('/transaction/db_profit_loss/monthly_report/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
309 310
  const getReportTPMB = (body) => api.post('/transaction/db_tax_planning/master_budget/get_report_hierarki', body)
  const getReportTPMR = (body) => api.post('/transaction/db_tax_planning/monthly_report/get_report_hierarki', body)
rifkaki's avatar
rifkaki committed
311
  const getReportTP = (body) => api.post('/transaction/db_tax_planning/get_report_hierarki', body)
312
  const getAllReportOI = (body) => api.post('/transaction/db_operating_indicator/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
313 314
  const getReportOIMB = (body) => api.post('/transaction/db_operating_indicator/master_budget/get_report_hierarki', body)
  const getReportOIMR = (body) => api.post('/transaction/db_operating_indicator/monthly_report/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
315 316
  const getReportCFSumaMB = (body) => api.post('/transaction/summary_cash_flow/master_budget/get_report_hierarki', body)
  const getReportCFSumaMR = (body) => api.post('/transaction/summary_cash_flow/monthly_report/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
317
  const getReportCFSuma = (body) => api.post('/transaction/summary_cash_flow/summary/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
318
  const getReportPLSuma = (body) => api.post('/transaction/summary_profit_loss/summary/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
319
  const getReportPLSummary = (body) => api.post('/transaction/summary_profit_loss/summary/get_report_hierarki_summary', body)
rifkaki's avatar
rifkaki committed
320
  const getReportFRSuma = (body) => api.post('/transaction/summary_ratio/summary/get_report_hierarki', body)
rifkaki's avatar
rifkaki committed
321 322 323
  const getReportFRMB = (body) => api.post('/transaction/summary_ratio/master_budget/get_report_hierarki', body)
  const getReportFRMR = (body) => api.post('/transaction/summary_ratio/monthly_report/get_report_hierarki', body)
  const getReportFRLastMR = (body) => api.post('/transaction/summary_ratio/monthly_report_last_year/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
324
  const getReportBSSuma = (body) => api.post('/transaction/summary_balance_sheet/summary/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
325
  const getDashboardCAT = (body) => api.post('/transaction/dashboard/get_dashboard_cat', body)
d.arizona's avatar
d.arizona committed
326
  const getListChildDashboardCAT = (periode,month) => api.get(`/transaction/dashboard/get_home_cat/${periode}/${month}`)
d.arizona's avatar
d.arizona committed
327
  const getDashboardCATDetail = (body) => api.post('/transaction/dashboard/get_dashboard_cat_detail', body)
rifkaki's avatar
rifkaki committed
328
  const getHierarkiReportYtd = (body) => api.post('/transaction/summary_ytd/summary/get_report_hierarki', body)
rifkaki's avatar
rifkaki committed
329
  const getHierarkiReportHistorical = (body) => api.post('/transaction/summary_historical/summary/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
330
  const getHierarkiReportMTD = (body) => api.post('/transaction/summary_mtd/summary/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
331
  const getHierarkiReportCPSM = (body) => api.post('/transaction/summary_cpsm/summary/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
332 333
  const getFullApproveMB = (body) => api.post('/transaction/master_budget/get_approved_submit', body)
  const getFullApproveMonthly = (body) => api.post('/transaction/monthly_report/get_approved_submit', body)
d.arizona's avatar
d.arizona committed
334
  const getDashboardFinancial = (body) => api.post('/transaction/dashboard/get_dashboard_financial', body)
d.arizona's avatar
d.arizona committed
335
  
d.arizona's avatar
d.arizona committed
336
  //CASH FLOW
Riri Novita's avatar
Riri Novita committed
337
  const getDetailReportCF = (body) => api.post('/transaction/cash_flow/master_budget/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
338
  const createReportCF = (body) => api.post('transaction/cash_flow/master_budget/create_submission_report', body)
d.arizona's avatar
d.arizona committed
339

Deni Rinaldi's avatar
Deni Rinaldi committed
340 341 342 343 344 345 346 347 348
  //OUTLOOK PA
  const getOutlookPAID = (body) => api.post('transaction/outlook_pa/get_outlook_pa_id', body)
  const getLastPeriodOLPA = (idCompany) => api.get(`/transaction/outlook_pa/get_last_periode/${idCompany}`)
  const getCompanySubmittedOLPA = (body) => api.post('transaction/outlook_pa/get_company_submitted', body)
  const getRevisionOLPA = (body) => api.post('transaction/outlook_pa/get_revision', body)
  const historyApprovalOLPA = (body) => api.post('transaction/outlook_pa/history_approval', body)
  const getSubmitOLPA = (body) => api.post('transaction/outlook_pa/get_latest_periode_submit', body)
  const getOLPAAtt = (body) => api.post('transaction/outlook_pa/get_report_attachment', body)
  const submitOLPA = (body) => api.post('transaction/outlook_pa/submit_outlook_pa', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
349
  const getDetailReportOLPA = (body) => api.post('transaction/outlook_pa/get_report_hierarki', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
350 351
  const getLastestUpdateOLPA = (body) => api.post('transaction/outlook_pa/get_latest_update', body)
  const createReportOLPA = (body) => api.post('transaction/outlook_pa/create_outlook_report', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
352
  const checkUploadOLPA = (body) => api.post('transaction/outlook_pa/check_import', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
353
  const validateSubmitReportOLPA = (body) => api.post('transaction/outlook_pa/validate_save', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
354
  const uploadOLPA = (body) => api.post('transaction/outlook_pa/import_outlook_pa', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
355
  const uploadAttOLPA = (body) => api.post('transaction/outlook_pa/upload_attachment', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
356 357
  const deleteAttOLPA = (id) => api.post(`transaction/outlook_pa/delete_attachment/${id}`)
  const getReportOLPA = (body) => api.post('transaction/outlook_pa/get_all_report', body)
d.arizona's avatar
d.arizona committed
358
  const approvalSubmissionOLPA = (body) => api.post('transaction/outlook_pa/approval_outlook', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
359
  const checkApproverOLPA = () => api.get('transaction/outlook_pa/is_approver')
d.arizona's avatar
d.arizona committed
360
  const createPeriodeRevisionOLPA = (body) => api.post('transaction/outlook_pa/create_periode_revision', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
361

Deni Rinaldi's avatar
Deni Rinaldi committed
362
  // Monthly
faisalhamdi's avatar
faisalhamdi committed
363
  const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body)
d.arizona's avatar
d.arizona committed
364 365 366
  const submitMonthlyReport = (body) => api.post('transaction/monthly_report/submit_monthly_report', body)
  const approvalMonthly = (body) => api.post('transaction/monthly_report/approval_monthly', body)
  const createPeriodeRevisionMonthly = (body) => api.post('transaction/monthly_report/create_periode_revision', body)
Riri Novita's avatar
Riri Novita committed
367
  const getMonthlyOI = (body) => api.post('transaction/operating_indicator/monthly_report/get_operating_indicator_id', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
368
  const getMonthlyReportID = (body) => api.post('transaction/monthly_report/get_monthly_report_id', body)
rifkaki's avatar
rifkaki committed
369 370
  // const getHierarkiMontlyReportBS = (body) => api.post('transaction/monthly_report_bs/get_report_hierarki', body)
  const getHierarkiMontlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/get_report_hierarki', body)
Riri Novita's avatar
Riri Novita committed
371
  const getHierarkiMontlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/get_report_hierarki', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
372
  const getLastestUpdateMR = (body) => api.post('/transaction/monthly_report/get_latest_update', body)
rifkaki's avatar
rifkaki committed
373 374
  // const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body)
  const getHierarkiMontlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
375
  const getHierarkiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_report_hierarki', body)
faisalhamdi's avatar
faisalhamdi committed
376
  const getHierarkiMontlyReportFAM = (body) => api.post('transaction/fam/monthly_report/get_report_hierarki', body)
d.arizona's avatar
d.arizona committed
377
  const getHierarkiMontlyReportCF = (body) => api.post('transaction/cash_flow/monthly_report/get_report_hierarki', body)
faisalhamdi's avatar
faisalhamdi committed
378
  const getHierarkiMontlyReportCAT = (body) => api.post('/transaction/cat/monthly_report/get_report_hierarki', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
379 380 381 382 383 384 385
  const getLastPeriodMonthly = (idCompany) => api.get(`transaction/monthly_report/get_last_periode/${idCompany}`)
  const checkApproverMonthly = () => api.get('transaction/monthly_report/is_approver')
  const getCompanySubmittedMonthly = (body) => api.post('transaction/monthly_report/get_company_submitted', body)
  const historyApprovalMonthly = (body) => api.post('transaction/monthly_report/history_approval', body)
  const getMontlyReportAtt = (body) => api.post('transaction/monthly_report/get_report_attachment', body)
  const uploadAttachmentMonthly = (body) => api.post('transaction/monthly_report/upload_attachment', body)
  const deleteAttachmentMonthly = (id) => api.post(`transaction/monthly_report/delete_attachment/${id}`)
rifkaki's avatar
rifkaki committed
386 387
  // const createMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/create_monthly_report', body)
  const createMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/create_monthly_report', body)
d.arizona's avatar
d.arizona committed
388
  const createMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/create_monthly_report', body)
rifkaki's avatar
rifkaki committed
389 390
  // const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body)
  const createMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/create_monthly_report', body)
faisalhamdi's avatar
faisalhamdi committed
391
  const createMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/create_monthly_report', body)
Riri Novita's avatar
Riri Novita committed
392
  const createMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/create_monthly_report', body)
faisalhamdi's avatar
faisalhamdi committed
393
  const createMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/create_monthly_report', body)
d.arizona's avatar
d.arizona committed
394
  const createMonthlyReportCF = (body) => api.post('transaction/cash_flow/monthly_report/create_monthly_report', body)
rifkaki's avatar
rifkaki committed
395 396
  // const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body)
  const checkUploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/check_import', body)
faisalhamdi's avatar
faisalhamdi committed
397
  const checkUploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/check_import', body)
rifkaki's avatar
rifkaki committed
398 399
  // const checkUploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/check_import', body)
  const checkUploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/check_import', body)
Riri Novita's avatar
Riri Novita committed
400
  const checkUploadMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/check_import', body)
faisalhamdi's avatar
faisalhamdi committed
401
  const checkUploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/check_import', body)
rifkaki's avatar
rifkaki committed
402 403
  // const uploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/import_monthly_report', body)
  const uploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/import_monthly_report', body)
faisalhamdi's avatar
faisalhamdi committed
404
  const uploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/import_monthly_report', body)
rifkaki's avatar
rifkaki committed
405 406
  // const uploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/import_monthly_report', body)
  const uploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/import_monthly_report', body)
Riri Novita's avatar
Riri Novita committed
407
  const uploadMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/import_monthly_report', body)
faisalhamdi's avatar
faisalhamdi committed
408
  const uploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/import_monthly_report', body)
rifkaki's avatar
rifkaki committed
409 410
  // const validateSubmitReportBS = (body) => api.post('transaction/monthly_report_bs/validate_save', body)
  const validateSubmitReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/validate_save', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
411
  const validateSubmitReportMR = (body) => api.post('transaction/monthly_report/validate_save', body)
rifkaki's avatar
rifkaki committed
412 413
  // const validateSubmitReportMRTP = (body) => api.post('transaction/monthly_report_tp/validate_save', body)
  const validateSubmitReportMRTP = (body) => api.post('transaction/tax_planning/monthly_report/validate_save', body)
d.arizona's avatar
d.arizona committed
414 415 416
  const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_per_bs', body)
  const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/check_import', body)
  const uploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/import_monthly_report', body)
Riri Novita's avatar
Riri Novita committed
417
  const validateSubmitReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/validate_save', body)
faisalhamdi's avatar
faisalhamdi committed
418
  const validateSubmitReportFAM = (body) => api.post('transaction/fam/monthly_report/validate_save', body)
Riri Novita's avatar
Riri Novita committed
419
  
d.arizona's avatar
d.arizona committed
420 421
  const getListUserSubcoMB = (periode) => api.get(`transaction/get_dashboard_sub_co/master_budget/${periode}`)
  const getListUserSubcoMR = (months,periode) => api.get(`transaction/get_dashboard_sub_co/monthly_report/${periode}/${months}`)
r.kurnia's avatar
r.kurnia committed
422 423
  const getListUserSubcoRO = (periode,quartal) => api.get(`transaction/get_dashboard_sub_co/rolling_outlook/${periode}/${quartal}`)
  const getListUserSubcoOL = (periode) => api.get(`transaction/get_dashboard_sub_co/outlook_pa/${periode}`)
d.arizona's avatar
d.arizona committed
424

d.arizona's avatar
d.arizona committed
425 426 427 428 429 430 431 432
  // Cronjob
  const getHierarkiCronJobMBPL = () => api.get('/transaction/report/get_hierarki_master_budget/profit_loss')
  const getHierarkiCronJobMBCF = () => api.get('/transaction/report/get_hierarki_master_budget/cash_flow')
  const getHierarkiCronJobMBRatio = () => api.get('/transaction/report/get_hierarki_master_budget/ratio')
  const getHierarkiCronJobMRPL = () => api.get('/transaction/report/get_hierarki_monthly_report/profit_loss')
  const getHierarkiCronJobMRCF = () => api.get('/transaction/report/get_hierarki_monthly_report/cash_flow')
  const getHierarkiCronJobMRRatio = () => api.get('/transaction/report/get_hierarki_monthly_report/ratio')
  
Riri Novita's avatar
Riri Novita committed
433
  // MonthlyPL
rifkaki's avatar
rifkaki committed
434 435 436 437 438 439 440 441 442 443
  // const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body)
  // const createMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/create_monthly_report', body)
  // const checkUploadMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/check_import', body)
  // const uploadMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/import_monthly_report', body)
  // const validateSubmitReportPL = (body) => api.post('transaction/monthly_report_pl/validate_save', body)
  const getHierarkiMontlyReportPL = (body) => api.post('transaction/profit_loss/monthly_report/get_report_hierarki', body)
  const createMonthlyReportPL = (body) => api.post('transaction/profit_loss/monthly_report/create_monthly_report', body)
  const checkUploadMonthlyReportPL = (body) => api.post('transaction/profit_loss/monthly_report/check_import', body)
  const uploadMonthlyReportPL = (body) => api.post('transaction/profit_loss/monthly_report/import_monthly_report', body)
  const validateSubmitReportPL = (body) => api.post('transaction/profit_loss/monthly_report/validate_save', body)
d.arizona's avatar
d.arizona committed
444
  //Template
Deni Rinaldi's avatar
Deni Rinaldi committed
445
  const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
446 447 448 449

  // UPLOAD FOTO
  const uploadFoto = (body) => api.post('attachment/upload_foto', body)

Deni Rinaldi's avatar
Deni Rinaldi committed
450
  // MANAGEMENT DOCUMENT
451 452
  // const getDocumentCategory = (body) => api.post('setting/get_all_setting_document_category', body)
  const getDocumentCategory = () => api.get('setting/get_all_setting_document_category')
Deni Rinaldi's avatar
Deni Rinaldi committed
453
  const getAllDocument = (body) => api.post('document/get_all_document', body)
Deni Rinaldi's avatar
Deni Rinaldi committed
454
  const uploadDocument = (body) => api.post('document/upload_document', body)
455
  const updateDocument = (body) => api.post('document/update_document', body)
456
  const downloadDocument = (body) => api.post('document/download_document', body)
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
457 458 459
  const getPerusahaanUserActive = () => api.get('company/get_all_user_company_active')
  const getDetailDocument = (id) => api.get(`document/get_document_by_id/${id}`)
  const deleteDocument = (id) => api.post(`document/delete_document/${id}`)
Deni Rinaldi's avatar
Deni Rinaldi committed
460

d.arizona's avatar
d.arizona committed
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475
  // ------
  // STEP 3
  // ------
  //
  // Return back a collection of functions that we would consider our
  // interface.  Most of the time it'll be just the list of all the
  // methods in step 2.
  //
  // Notice we're not returning back the `api` created in step 1?  That's
  // because it is scoped privately.  This is one way to create truly
  // private scoped goodies in JavaScript.
  //
  return {
    // a list of the API functions from step 2
    getRoot,
EKSAD's avatar
EKSAD committed
476
    login,
EKSAD's avatar
EKSAD committed
477
    verification,
EKSAD's avatar
EKSAD committed
478
    resetPassword,
EKSAD's avatar
EKSAD committed
479
    isResetPassword,
d.arizona's avatar
d.arizona committed
480
    getRole,
d.arizona's avatar
d.arizona committed
481
    getDetailRole,
d.arizona's avatar
d.arizona committed
482
    searchRole,
d.arizona's avatar
d.arizona committed
483 484 485
    addRole,
    editRole,
    deleteRole,
486
    getMenu,
Deni Rinaldi's avatar
Deni Rinaldi committed
487 488 489
    getUnitBisnis,
    createUnitBisnis,
    updateUnitBisnis,
faisalhamdi's avatar
faisalhamdi committed
490
    searchUnitBisnis,
faisalhamdi's avatar
faisalhamdi committed
491 492
    getPerusahaan,
    createPerusahaan,
d.arizona's avatar
d.arizona committed
493
    updatePerusahaan,
494
    getAM,
495
    getApprovedByAM,
496 497
    getTypeAM,
    getOperatorAM,
498
    getDetailAM,
499
    searchAM,
500
    createAM,
d.arizona's avatar
d.arizona committed
501
    updateAM,
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
502 503 504
    updateVAM,
    checkUploadAM,
    uploadAM,
505
    deleteAM,
d.arizona's avatar
d.arizona committed
506 507 508 509 510 511
    getUser,
    getDetailUser,
    searchUser,
    createUser,
    updateUser,
    deleteUser,
Deni Rinaldi's avatar
1  
Deni Rinaldi committed
512
    downloadTemplate,
513 514
    checkUploadUnitBisnis,
    uploadUnitBisnis,
d.arizona's avatar
d.arizona committed
515
    changePassword,
Deni Rinaldi's avatar
Deni Rinaldi committed
516 517
    getPerusahaanHierarki,
    checkUploadUser,
EKSAD's avatar
EKSAD committed
518 519
    uploadUser,
    getReportItems,
EKSAD's avatar
EKSAD committed
520 521
    searchReportItems,
    createReportItems,
EKSAD's avatar
EKSAD committed
522
    updateReportItems,
EKSAD's avatar
EKSAD committed
523
    getDetailReportItems,
EKSAD's avatar
EKSAD committed
524
    getInputType,
EKSAD's avatar
EKSAD committed
525
    getReportType,
EKSAD's avatar
EKSAD committed
526 527
    checkUploadReportItems,
    uploadReportItems,
528 529 530 531 532 533 534
    getAllParameter,
    getAllGroup,
    getParameterByGroup,
    getDetailParameter,
    updateParameter,
    createParameter,
    getPerusahaanActive,
Deni Rinaldi's avatar
Deni Rinaldi committed
535 536
    getRoleActive,
    checkUploadParameter,
d.arizona's avatar
d.arizona committed
537 538
    uploadParameter,
    getItemReportHierarki,
d.arizona's avatar
d.arizona committed
539
    getMenuByRole,
d.arizona's avatar
d.arizona committed
540
    saveVisualisasiReport,
d.arizona's avatar
d.arizona committed
541
    saveVisualisasiPerusahaan,
d.arizona's avatar
d.arizona committed
542
    getReportParent,
543 544 545 546 547 548
    searchParameter,
    checkUploadPerusahaan,
    getDetailPerusahaan,
    uploadPerusahaan,
    searchPerusahaan,
    getUnitBisnisActive,
549 550
    getMenuByUser,
    getDetailUnitBisnis,
Deni Rinaldi's avatar
Deni Rinaldi committed
551
    uploadFoto,
Deni Rinaldi's avatar
Deni Rinaldi committed
552
    getReportTypeBody,
553 554 555 556
    getPermission,
    getMasterBudgetAtt,
    uploadAttachment,
    getPeriodeTransaction,
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
557
    getMonthTransaction,
Deni Rinaldi's avatar
Deni Rinaldi committed
558
    getRevision,
Deni Rinaldi's avatar
Deni Rinaldi committed
559
    deleteAttachment,
Deni Rinaldi's avatar
Deni Rinaldi committed
560 561
    getDetailReportMB,
    deleteUnitBisnis,
a.bairuha's avatar
a.bairuha committed
562
    deleteParameter,
faisalhamdi's avatar
faisalhamdi committed
563
    deletePerusahaan,
Deni Rinaldi's avatar
Deni Rinaldi committed
564 565
    deleteReportItems,
    getDocumentCategory,
Deni Rinaldi's avatar
Deni Rinaldi committed
566
    getAllDocument,
Deni Rinaldi's avatar
Deni Rinaldi committed
567
    uploadDocument,
568
    updateDocument,
569
    downloadDocument,
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
570 571 572
    getPerusahaanUserActive,
    getDetailDocument,
    deleteDocument,
Deni Rinaldi's avatar
Deni Rinaldi committed
573
    createSubmitReport,
Deni Rinaldi's avatar
Deni Rinaldi committed
574
    createMonthlyReportBS,
d.arizona's avatar
d.arizona committed
575
    createMonthlyReportLOCF,
576
    createMonthlyReportTP,
Riri Novita's avatar
Riri Novita committed
577
    createMonthlyReportPL,
faisalhamdi's avatar
faisalhamdi committed
578
    createMonthlyReportFAM,
Riri Novita's avatar
Riri Novita committed
579
    createMonthlyReportOI,
faisalhamdi's avatar
faisalhamdi committed
580
    createMonthlyReportCAT,
Riri Novita's avatar
Riri Novita committed
581
    checkUploadMonthlyReportPL,
Deni Rinaldi's avatar
Deni Rinaldi committed
582
    getSubmission,
d.arizona's avatar
d.arizona committed
583 584 585
    checkUploadMB,
    getAllOperatingInd,
    getOperatingIndDetail,
586
    createOpetaingInd,
Deni Rinaldi's avatar
Deni Rinaldi committed
587
    uploadMasterBudget,
d.arizona's avatar
d.arizona committed
588
    getAllSettingByType,
d.arizona's avatar
d.arizona committed
589 590
    getOpetratingIndID,
    createAllItemReport,
d.arizona's avatar
d.arizona committed
591
    deleteAllItemReport,
d.arizona's avatar
d.arizona committed
592 593
    validateSubmitReport,
    checkUploadOperatingInd,
594
    uploadOperatingInd,
Deni Rinaldi's avatar
Deni Rinaldi committed
595
    getLastestUpdateMB,
Deni Rinaldi's avatar
Deni Rinaldi committed
596
    getLastestUpdateMR,
r.kurnia's avatar
r.kurnia committed
597
    getLastestUpdateMROI,
Deni Rinaldi's avatar
Deni Rinaldi committed
598
    countingFormula,
Deni Rinaldi's avatar
Deni Rinaldi committed
599
    submitMasterBudget,
600
    checkIsSubmit,
d.arizona's avatar
d.arizona committed
601
    getIdDeleteFromExcel,
Deni Rinaldi's avatar
Deni Rinaldi committed
602
    getDashboard,
Deni Rinaldi's avatar
Deni Rinaldi committed
603
    historyApproval,
Rifka Kurnia Irfiana's avatar
Rifka Kurnia Irfiana committed
604
    getDashboardMB,
Deni Rinaldi's avatar
Deni Rinaldi committed
605
    checkApprover,
Deni Rinaldi's avatar
Deni Rinaldi committed
606
    approvalSubmission,
Deni Rinaldi's avatar
Deni Rinaldi committed
607
    getCompanySubmitted,
Deni Rinaldi's avatar
Deni Rinaldi committed
608
    getLastPeriod,
Deni Rinaldi's avatar
Deni Rinaldi committed
609 610 611 612 613 614 615
    getLastPeriodMonthly,
    checkApproverMonthly,
    getCompanySubmittedMonthly,
    historyApprovalMonthly,
    uploadAttachmentMonthly,
    getMontlyReportAtt,
    deleteAttachmentMonthly,
d.arizona's avatar
d.arizona committed
616
    getSubmitMasterBudget,
Deni Rinaldi's avatar
Deni Rinaldi committed
617
    createPeriodeRevision,
618
    getLastestUpdateOI,
Deni Rinaldi's avatar
Deni Rinaldi committed
619 620 621 622 623 624 625 626 627
    getOutlookPAID,
    getLastPeriodOLPA,
    getCompanySubmittedOLPA,
    getRevisionOLPA,
    historyApprovalOLPA,
    getSubmitOLPA,
    getOLPAAtt,
    submitOLPA,
    getLastestUpdateOLPA,
Deni Rinaldi's avatar
Deni Rinaldi committed
628 629
    createReportOLPA,
    checkUploadOLPA,
Deni Rinaldi's avatar
Deni Rinaldi committed
630
    uploadOLPA,
Deni Rinaldi's avatar
Deni Rinaldi committed
631
    validateSubmitReportOLPA,
Deni Rinaldi's avatar
Deni Rinaldi committed
632
    getDetailReportOLPA,
Deni Rinaldi's avatar
Deni Rinaldi committed
633 634
    uploadAttOLPA,
    deleteAttOLPA,
Deni Rinaldi's avatar
Deni Rinaldi committed
635 636
    getReportOLPA,
    approvalSubmissionOLPA,
d.arizona's avatar
d.arizona committed
637
    checkApproverOLPA,
Deni Rinaldi's avatar
Deni Rinaldi committed
638 639
    getLastPeriodeOI,
    getSubmitOI,
Deni Rinaldi's avatar
Deni Rinaldi committed
640
    getLastPeriodOI,
d.arizona's avatar
d.arizona committed
641
    getDashboardUser,
Deni Rinaldi's avatar
Deni Rinaldi committed
642 643
    getHierarkiMontlyReportBS,
    getHierarkiMontlyReportOI,
r.kurnia's avatar
r.kurnia committed
644
    getHierarkiMontlyReportTP,
Deni Rinaldi's avatar
Deni Rinaldi committed
645
    getDetailReportCF,
Deni Rinaldi's avatar
Deni Rinaldi committed
646
    getReportHierarkiPL,
Deni Rinaldi's avatar
Deni Rinaldi committed
647
    getMonthlyReportID,
rifkaki's avatar
rifkaki committed
648 649
    getReportHierarkiFRMB,
    getReportHierarkiFRMR,
Deni Rinaldi's avatar
Deni Rinaldi committed
650
    getDetailHierarkiCF,
Deni Rinaldi's avatar
Deni Rinaldi committed
651
    getHierarkiMontlyReportPL,
652
    getHierarkiMontlyReportLOCF,
653
    getHierarkiMontlyReportFAM,
Riri Novita's avatar
Riri Novita committed
654
    getHierarkiMontlyReportCAT,
faisalhamdi's avatar
faisalhamdi committed
655
    checkUploadMonthlyReportTP,
faisalhamdi's avatar
faisalhamdi committed
656
    checkUploadMonthlyReportFAM,
Riri Novita's avatar
Riri Novita committed
657
    checkUploadMonthlyReportOI,
faisalhamdi's avatar
faisalhamdi committed
658
    checkUploadMonthlyReportCAT,
Riri Novita's avatar
Riri Novita committed
659
    uploadMonthlyReportPL,
d.arizona's avatar
d.arizona committed
660 661
    getMonthlyReport,
    checkUploadMonthlyReportBS,
faisalhamdi's avatar
faisalhamdi committed
662
    uploadMonthlyReportBS,
r.kurnia's avatar
r.kurnia committed
663
    uploadMonthlyReportFAM,
Deni Rinaldi's avatar
Deni Rinaldi committed
664
    uploadMonthlyReportTP,
Riri Novita's avatar
Riri Novita committed
665
    uploadMonthlyReportOI,
faisalhamdi's avatar
faisalhamdi committed
666
    uploadMonthlyReportCAT,
Deni Rinaldi's avatar
Deni Rinaldi committed
667
    getHierarkiMontlyReportCF,
r.kurnia's avatar
r.kurnia committed
668
    validateSubmitReportMR,
669
    validateSubmitReportMRTP,
Riri Novita's avatar
Riri Novita committed
670
    validateSubmitReportBS,
d.arizona's avatar
d.arizona committed
671 672 673
    validateSubmitReportPL,
    getPerBSiMontlyReportLOCF,
    checkUploadMonthlyReportLOCF,
674
    uploadMonthlyReportLOCF,
Riri Novita's avatar
Riri Novita committed
675
    validateSubmitReportOI,
d.arizona's avatar
d.arizona committed
676
    getMonthlyOI,
d.arizona's avatar
d.arizona committed
677
    getParameterByGroupName,
d.arizona's avatar
d.arizona committed
678 679
    getSubmitMonthlyReport,
    getIdDeleteFromExcelLOCF,
d.arizona's avatar
d.arizona committed
680 681 682
    deleteAllItemReportLOCF,
    submitMonthlyReport,
    approvalMonthly,
d.arizona's avatar
d.arizona committed
683 684
    createPeriodeRevisionMonthly,
    getListUserSubcoMB,
faisalhamdi's avatar
faisalhamdi committed
685
    getListUserSubcoMR,
r.kurnia's avatar
r.kurnia committed
686 687
    getListUserSubcoRO,
    getListUserSubcoOL,
d.arizona's avatar
d.arizona committed
688
    validateSubmitReportFAM,
d.arizona's avatar
d.arizona committed
689 690 691 692 693
    createMonthlyReportCF,
    getReportBSMB,
    getReportBSMR,
    getReportPLDetailMB,
    getReportPLDetailMR,
694 695
    // getReportPLMB,
    // getReportPLMR,
d.arizona's avatar
d.arizona committed
696 697
    getReportTPMB,
    getReportTPMR,
rifkaki's avatar
rifkaki committed
698
    getReportTP,
d.arizona's avatar
d.arizona committed
699
    getReportOIMB,
d.arizona's avatar
d.arizona committed
700 701
    getReportOIMR,
    getReportCFSumaMB,
d.arizona's avatar
d.arizona committed
702
    getReportCFSumaMR,
d.arizona's avatar
d.arizona committed
703
    createReportCF,
Riri Novita's avatar
Riri Novita committed
704
    getReportCFSuma,
705
    getReportPLSuma,
Riri Novita's avatar
Riri Novita committed
706
    getReportPLSummary,
707 708
    getAllReportBS,
    getAllReportPLDetail,
709
    getAllReportOI,
rifkaki's avatar
rifkaki committed
710
    getReportFRSuma,
rifkaki's avatar
rifkaki committed
711 712
    getReportFRMB,
    getReportFRMR,
faisalhamdi's avatar
faisalhamdi committed
713
    getReportFRLastMR,
d.arizona's avatar
d.arizona committed
714
    getReportBSSuma,
715 716
    getDashboardCAT,
    getReportPL,
Riri Novita's avatar
Riri Novita committed
717
    getReportFR,
718 719 720
    getHierarkiCreateReportPLMB,
    getHierarkiCreateReportPLMR,
    createReportPLMB,
rifkaki's avatar
rifkaki committed
721
    createReportPLMR,
rifkaki's avatar
rifkaki committed
722
    getPLID,
Riri Novita's avatar
Riri Novita committed
723
    getFRID,
Riri Novita's avatar
Riri Novita committed
724
    getHierarkiReportHistorical,
rifkaki's avatar
rifkaki committed
725
    getHierarkiReportMTD,
726
    getHierarkiReportYtd,
Riri Novita's avatar
Riri Novita committed
727
    getHierarkiReportCPSM,
728 729 730
    getHierarkiCreateReportFRMB,
    getHierarkiCreateReportFRMR,
    createReportFRMB,
Riri Novita's avatar
Riri Novita committed
731 732
    createReportFRMR,
    getFullApproveMB,
d.arizona's avatar
d.arizona committed
733
    getFullApproveMonthly,
d.arizona's avatar
d.arizona committed
734 735 736 737 738 739
    getDashboardFinancial,
    getHierarkiCronJobMBPL,
    getHierarkiCronJobMBCF,
    getHierarkiCronJobMBRatio,
    getHierarkiCronJobMRPL,
    getHierarkiCronJobMRCF,
740 741
    getHierarkiCronJobMRRatio,
    getRollingOutlookID,
rifkaki's avatar
rifkaki committed
742
    getRollingOutlookBS,
rifkaki's avatar
rifkaki committed
743
    createRollingOutlookBS,
rifkaki's avatar
rifkaki committed
744
    getRollingOutlookTP,
rifkaki's avatar
rifkaki committed
745
    createRollingOutlookTP,
r.kurnia's avatar
r.kurnia committed
746 747
    checkImportRollingOutlookTP,
    importRollingOutlookTP,
748 749
    getAllMasterDataCat,
    getParentItemReport,
faisalhamdi's avatar
faisalhamdi committed
750
    saveMasterDataCat,
faisalhamdi's avatar
faisalhamdi committed
751
    updateMasterDataCat,
faisalhamdi's avatar
faisalhamdi committed
752
    getDetailMasterDataCat,
d.arizona's avatar
d.arizona committed
753 754
    deleteMasterDataCat,
    getListChildDashboardCAT,
Riri Novita's avatar
Riri Novita committed
755
    getDashboardCATDetail,
d.arizona's avatar
d.arizona committed
756 757 758 759 760 761 762 763
    getRollingOutlookPL,
    getRollingOutlookAttachment,
    uploadRollingOutlookAttachment,
    deleteRollingOutlookAttachment,
    getRollingOutlookReport,
    getRollingOutlookLastUpdate,
    getRollingOutlookRevision,
    getRollingOutlookIsApprover,
rifkaki's avatar
rifkaki committed
764 765
    uploadAttachmentRO,
    deleteAttachmentRO,
d.arizona's avatar
d.arizona committed
766
    checkImportRollingOutlookBS,
faisalhamdi's avatar
faisalhamdi committed
767
    importRollingOutlookBS,
768
    getRollingOutlookCAT,
faisalhamdi's avatar
faisalhamdi committed
769 770 771
    createRollingOutlookCAT,
    checkImportRollingOutlookCAT,
    importRollingOutlookCAT,
d.arizona's avatar
d.arizona committed
772 773 774
    createRollingOutlookPL,
    checkImportRollingOutlookPL,
    importRollingOutlookPL,
775
    getSubmitRollingOutlook,
Riri Novita's avatar
Riri Novita committed
776 777 778
    getRollingOI,
    getHierarkiRollingOI,
    createRollingOI,
Riri Novita's avatar
Riri Novita committed
779
    getLastestUpdateROOI,
Riri Novita's avatar
Riri Novita committed
780
    checkUploadRollingOutlookOI,
d.arizona's avatar
d.arizona committed
781
    uploadRollingOutlookOI,
d.arizona's avatar
d.arizona committed
782
    submitRollingOutlook,
d.arizona's avatar
d.arizona committed
783
    getRollingOutlookCompanySubmitted,
d.arizona's avatar
d.arizona committed
784 785 786
    createPeriodeRevisionOLPA,
    approvalRolling,
    createPeriodeRevisionRO,
Riri Novita's avatar
Riri Novita committed
787
    historyApprovalRO,
Deni Rinaldi's avatar
Deni Rinaldi committed
788 789
    getRollingOutlookCF,
    createRollingOutlookCF
d.arizona's avatar
d.arizona committed
790 791 792 793 794 795
  }
}

// let's return back our create method as the default.
export default {
  create
Deni Rinaldi's avatar
Deni Rinaldi committed
796
}