Advertisement
Aguezz

SISI - QMO - Quotation Detail

Sep 10th, 2022
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.27 KB | None | 0 0
  1. /* eslint-disable react/no-direct-mutation-state */
  2. import React, {Component} from 'react';
  3. import {connect} from 'react-redux';
  4. import 'react-table/react-table.css';
  5. import { withTranslation } from 'react-i18next';
  6. import { toastr } from 'react-redux-toastr';
  7. import { Modal, ModalHeader } from 'reactstrap';
  8. import ReactLoading from 'react-loading';
  9. import { fileUpload } from '../../../../store/actions/uploadActions';
  10. import { fetchIncoterms } from '../../../../store/actions/master/incotermsActions';
  11. import { getProposalTender } from '../../../../store/actions/tendering/proposalTenderActions';
  12. import { getVendorQuotation, submitVendorQuotation, updateVendorQuotation, submitScoring, getScoring } from '../../../../store/actions/tendering/quotationActions';
  13. import { fetchPurchasingOrg } from '../../../../store/actions/master/purchasingOrgActions';
  14. import { compareSemanticVersions } from '../../../../helpers/globalHelper';
  15. import Form from './Form';
  16. import PaktaIntegritas from '../modal/PaktaIntegritas';
  17. import Numeric from '../modal/Numeric';
  18. import Pengalaman from '../modal/Pengalaman';
  19. import TenagaAhli from '../modal/TenagaAhli';
  20. import ModalAspekTeknis from '../modal/ModalSyaratItem';
  21. import { deleteProposalTenderSyaratItem, fetchProposalTenderSyaratItem, saveProposalTenderSyaratItem, showProposalTenderSyaratItem, updateProposalTenderSyaratItem } from '../../../../store/actions/tendering/proposalTenderSyaratItemActions';
  22. import SweetAlert from 'react-bootstrap-sweetalert';
  23.  
  24. class QuotationDetail extends Component {
  25. constructor(props) {
  26. super(props);
  27. this._isMounted = false;
  28. this.state = {
  29. paramId: this.props.location.pathname.split("/")[4],
  30. paramType: this.props.location.pathname.split("/")[3],
  31. modalOpen: false,
  32. modalOpenNumeric: false,
  33. modalOpenPengalaman: false,
  34. modalOpenTenagaAhli: false,
  35. modalOpenSyaratItem: false,
  36. selectedTeknis: '',
  37. sendData: {},
  38. tempData: {},
  39. pakta_integritas: {
  40. sendData: {
  41. status_approval: '',
  42. },
  43. purchasing_org: {}
  44. },
  45. quotation: {
  46. header: {
  47. ambang_batas: '',
  48. approved_at: '',
  49. bid_bond: '',
  50. bid_bond_value: '',
  51. bobot_komersil: '',
  52. bobot_teknis: '',
  53. created_at: '',
  54. created_by: '',
  55. delivery_location: '',
  56. delivery_time: '',
  57. id: '',
  58. incoterm_id: '',
  59. lingkup_pekerjaan: '',
  60. masa_berlaku: '',
  61. metode_aanwijzing_id: '',
  62. metode_evaluasi: '',
  63. metode_negosiasi: '',
  64. metode_pengadaan_id: '',
  65. metode_penyampaian_id: '',
  66. metode_aanwijzing: '',
  67. metode_pengadaan: '',
  68. metode_penyampaian: '',
  69. multiwinner: '',
  70. note_external: '',
  71. note_internal: '',
  72. number: '',
  73. order_placement: '',
  74. pra_qualification: '',
  75. purchasing_group_id: '',
  76. purchasing_org_id: '',
  77. purchasing_org_name: '',
  78. reference: '',
  79. status: '',
  80. status_aanwijzing: '',
  81. status_text: '',
  82. title: '',
  83. updated_at: '',
  84. updated_by: '',
  85. uuid: '',
  86. visibilitas_bid_open: '',
  87. current_step: '',
  88. company_name: '',
  89. },
  90. attachments: [],
  91. items: [],
  92. schedules: [],
  93. terms: [],
  94. errors: [],
  95. m_incoterm: [],
  96. tempQuotes: [],
  97. form_teknis: [],
  98. },
  99. loadings: {
  100. button: false,
  101. modal: false,
  102. pages: false,
  103. items: false,
  104. incoterm: false,
  105. buttonUpload: false,
  106.  
  107. syarat_item_fetching: false,
  108. syarat_item_creating: false,
  109. syarat_item_getting: false,
  110. syarat_item_updating: false,
  111. syarat_item_deleting: false,
  112. syarat_item_getting_uuid: null,
  113. syarat_item_updating_uuid: null,
  114. syarat_item_deleting_uuid: null,
  115. },
  116. syarat_item_list: [],
  117. syarat_item_detail: {},
  118. swal: {
  119. show: false,
  120. type: null,
  121. uuid: null,
  122. }
  123. }
  124. }
  125.  
  126. componentDidMount = () => {
  127. this._isMounted = true;
  128. if(this._isMounted){
  129. this.getProposalTender(this.state.paramId)
  130. this.fetchIncoterms('')
  131. this.fetchSyaratItem();
  132. }
  133. }
  134.  
  135. componentWillUnmount() {
  136. this._isMounted = false;
  137. // fix Warning: Can't perform a React state update on an unmounted component
  138. this.setState = (state,callback)=>{
  139. return;
  140. };
  141. }
  142.  
  143. fetchIncoterms = (params) => {
  144. if(this._isMounted){
  145. let select_params = (params !== '') ? {select: params} : {start: 0, length: 10};
  146. this.setState(({ loadings, quotation }) => ({
  147. loadings: { ...loadings, incoterm: true },
  148. quotation: { ...quotation, m_incoterm: [] }
  149. }));
  150. const resp = {
  151. "status": "success",
  152. "message": "Berhasil mendapatkan data.",
  153. "draw": 0,
  154. "recordsTotal": 2,
  155. "recordsFiltered": 2,
  156. "data": [
  157. {
  158. "id": "FOT",
  159. "uuid": "846f47a5-525e-4647-92f3-6a0865406b6b",
  160. "name": "FOT",
  161. "status": "y",
  162. "created_by": "77eea109-8f81-4996-aad2-e34ad11b4e42",
  163. "updated_by": "77eea109-8f81-4996-aad2-e34ad11b4e42",
  164. "created_at": "2021-12-15 08:42:12",
  165. "updated_at": "2021-12-15 08:42:12"
  166. },
  167. {
  168. "id": "FRA",
  169. "uuid": "854e9805-9d47-4fd0-a76b-759936205e69",
  170. "name": "FRANCO",
  171. "status": "y",
  172. "created_by": "77eea109-8f81-4996-aad2-e34ad11b4e42",
  173. "updated_by": "77eea109-8f81-4996-aad2-e34ad11b4e42",
  174. "created_at": "2021-12-15 08:42:02",
  175. "updated_at": "2021-12-15 08:42:02"
  176. }
  177. ],
  178. "queries": [
  179. {
  180. "query": "select count(*) as aggregate from \"incoterms\"",
  181. "bindings": [],
  182. "time": 0.54
  183. },
  184. {
  185. "query": "select count(*) as aggregate from \"incoterms\"",
  186. "bindings": [],
  187. "time": 0.24
  188. },
  189. {
  190. "query": "select * from \"incoterms\" order by \"id\" asc limit 10 offset 0",
  191. "bindings": [],
  192. "time": 0.38
  193. }
  194. ],
  195. "input": {
  196. "start": "0",
  197. "length": "10"
  198. }
  199. }
  200. // this.props.fetchIncoterms(select_params)
  201. // .then((resp) => {
  202. let m_incoterm = resp.data;
  203. let options = m_incoterm.map((dt) => {
  204. return { value: dt.id, label: dt.id+' - '+dt.name };
  205. })
  206. this.setState(({ loadings, quotation }) => ({
  207. loadings: { ...loadings, incoterm: false },
  208. quotation: { ...quotation, m_incoterm: options }
  209. }));
  210. // })
  211. // .catch((resp) => {
  212. // this.setState(({ loadings, quotation }) => ({
  213. // loadings: { ...loadings, incoterm: false },
  214. // quotation: { ...quotation, m_incoterm: [] }
  215. // }));
  216. // toastr.error(resp.data.status, resp.data.message);
  217. // });
  218. }
  219. }
  220.  
  221. getProposalTender = (uuid, params) => {
  222. if(this._isMounted){
  223. this.setState(({ loadings }) => ({ loadings: { ...loadings, items: true, button: true } }));
  224. // this.props.getProposalTender(uuid, params)
  225. const resp = {
  226. "status": "success",
  227. "message": "Berhasil mendapatkan data.",
  228. "data": {
  229. "id": 14,
  230. "uuid": "eea15423-3176-4023-9d05-613099822e0d",
  231. "title": "Biaya Pendampingan",
  232. "number": "PT/A000/202209/00009",
  233. "reference": null,
  234. "metode_pengadaan_id": 2,
  235. "pra_qualification": 0,
  236. "metode_aanwijzing_id": 2,
  237. "metode_penyampaian_id": "2s",
  238. "metode_evaluasi": "sistem_nilai",
  239. "metode_negosiasi": "non_auction",
  240. "order_placement": "paket",
  241. "multiwinner": "0",
  242. "bid_bond": "0",
  243. "bid_bond_value": null,
  244. "incoterm_id": "FOT",
  245. "visibilitas_bid_open": "privat",
  246. "delivery_location": "PPA",
  247. "masa_berlaku": 3,
  248. "delivery_time": 30,
  249. "lingkup_pekerjaan": null,
  250. "note_internal": null,
  251. "note_external": null,
  252. "status": "y",
  253. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  254. "updated_by": "575992a8-6d47-4865-9765-748c42cab120",
  255. "created_at": "2022-09-09 09:01:12",
  256. "updated_at": "2022-09-10 06:41:43",
  257. "status_text": null,
  258. "bobot_teknis": "70",
  259. "bobot_komersil": "30",
  260. "ambang_batas": "60.00",
  261. "approved_at": "2022-09-10 06:41:43",
  262. "status_aanwijzing": null,
  263. "purchasing_org_id": "A000",
  264. "purchasing_group_id": "S01",
  265. "pq_start_date": null,
  266. "pq_end_date": null,
  267. "pq_start_time": null,
  268. "pq_end_time": null,
  269. "bid_administrasi": null,
  270. "bid_comersil": null,
  271. "pq_status": "d",
  272. "note_aanwijzing": null,
  273. "is_retender": "n",
  274. "retender_file": null,
  275. "retender_note": null,
  276. "bid_opening_bapp": null,
  277. "status_bo_task": null,
  278. "evaadmin_date": null,
  279. "evatek_date": null,
  280. "evakom_date": null,
  281. "bid_opening_date": null,
  282. "link_conference": "meet.google.com",
  283. "registration_status": "register",
  284. "attachments": [
  285. {
  286. "id": 64,
  287. "uuid": "8aeaef21-c401-457c-afdf-157bf3ef5bbd",
  288. "proposal_tender_id": 14,
  289. "purchasing_requisition_attachment_id": 33,
  290. "share": "0",
  291. "status": "d",
  292. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  293. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  294. "created_at": "2022-09-10 05:08:33",
  295. "updated_at": "2022-09-10 05:08:33",
  296. "type": "7",
  297. "description": "TOR-3",
  298. "file": "download2_1662710176.pdf",
  299. "document_number": "TOR-3",
  300. "document_date": "2022-07-30",
  301. "type_name": "TOR",
  302. "is_internal": "i"
  303. },
  304. {
  305. "id": 65,
  306. "uuid": "9265c585-b184-45dc-8c2c-7218ef5c2a1e",
  307. "proposal_tender_id": 14,
  308. "purchasing_requisition_attachment_id": 32,
  309. "share": "0",
  310. "status": "d",
  311. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  312. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  313. "created_at": "2022-09-10 05:08:33",
  314. "updated_at": "2022-09-10 05:08:33",
  315. "type": "6",
  316. "description": "DOkumen HPS 3",
  317. "file": "download3_1662710139.pdf",
  318. "document_number": "HPS-03",
  319. "document_date": "2022-07-30",
  320. "type_name": "OE/HPS",
  321. "is_internal": "i"
  322. },
  323. {
  324. "id": 66,
  325. "uuid": "b4135650-f684-4423-87b4-7253c3b3df25",
  326. "proposal_tender_id": 14,
  327. "purchasing_requisition_attachment_id": 31,
  328. "share": "0",
  329. "status": "d",
  330. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  331. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  332. "created_at": "2022-09-10 05:08:33",
  333. "updated_at": "2022-09-10 05:08:33",
  334. "type": "1",
  335. "description": "Dokumen memo 3",
  336. "file": "contoh_dokumen_upload_1662710084.pdf",
  337. "document_number": "Memo-03",
  338. "document_date": "2022-07-30",
  339. "type_name": "MEMO",
  340. "is_internal": "i"
  341. }
  342. ],
  343. "items": [
  344. {
  345. "id": 53,
  346. "uuid": "a1e7d0de-5abb-4158-b057-adad7d555510",
  347. "proposal_tender_id": 14,
  348. "purchasing_requisition_item_id": 153,
  349. "status": "y",
  350. "created_at": "2022-09-10 05:08:33",
  351. "updated_at": "2022-09-10 05:08:33",
  352. "purchasing_requisition_id": 62,
  353. "qty": 1,
  354. "purchase_requisition_service_id": null,
  355. "is_retender_itemize": null,
  356. "retender_approved_at": null,
  357. "note": null,
  358. "file": null,
  359. "retender_approved_by": null,
  360. "number_pr": "122000566",
  361. "pr_item_id": 153,
  362. "pr_item_uuid": "2703d962-e7af-48a5-9b65-15fa215d25e8",
  363. "item_no": 1,
  364. "material_id": "277",
  365. "short_text": "Baiya Pendampingan",
  366. "material_group_id": null,
  367. "material_group_name": null,
  368. "plant_id": "S101",
  369. "uom": "Currency",
  370. "per": 1,
  371. "tipe": "barang",
  372. "valuation_price": 150000000,
  373. "currency": "IDR",
  374. "long_text": null,
  375. "pr_status": "s",
  376. "pr_catatan_buyer": null,
  377. "total_price": "150000000.0000000000000000000000"
  378. }
  379. ],
  380. "edoc": [],
  381. "aanwijzing_attachment": [],
  382. "terms": [
  383. {
  384. "id": 164,
  385. "uuid": "31de01f7-93f0-4118-8018-0932db708b12",
  386. "proposal_tender_id": 14,
  387. "description": "Scoring",
  388. "bobot": null,
  389. "tipe": "2",
  390. "attachment": "n",
  391. "status": "y",
  392. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  393. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  394. "created_at": "2022-09-10 05:08:33",
  395. "updated_at": "2022-09-10 05:08:33",
  396. "template_tipe_input": "",
  397. "tampilkan_sub": "n",
  398. "passing_grade": "0",
  399. "order_no": "19",
  400. "template_syarat_parent_id": null,
  401. "sub": null,
  402. "template_syarat_id": null,
  403. "tearing": []
  404. }
  405. ],
  406. "form_teknis": [
  407. {
  408. "id": 146,
  409. "uuid": "d12310c6-3161-489f-89af-25359d226d3a",
  410. "proposal_tender_id": 14,
  411. "description": "Pengalaman Perusahaan yang manufaktur dan galangan BUMN atau perusahaan Swasta dalam kurun waktu 3 (tiga) tahun terakhir",
  412. "bobot": null,
  413. "tipe": "4",
  414. "attachment": "n",
  415. "status": "y",
  416. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  417. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  418. "created_at": "2022-09-10 05:08:33",
  419. "updated_at": "2022-09-10 05:08:33",
  420. "template_tipe_input": "",
  421. "tampilkan_sub": "n",
  422. "passing_grade": "0",
  423. "order_no": "1",
  424. "template_syarat_parent_id": null,
  425. "sub": "1",
  426. "template_syarat_id": 196,
  427. "nilai": null,
  428. "scoring_teknis_id": null,
  429. "child_count": 2,
  430. "pengalaman": []
  431. },
  432. {
  433. "id": 147,
  434. "uuid": "c6c73ce2-33ae-416e-beb0-34b091e92ad0",
  435. "proposal_tender_id": 14,
  436. "description": "Pengalaman perusahaan di BUMN dan/atau anak perusahaan BUMN dalam 3 Tahun terakhir (terhitung sejak 2018)",
  437. "bobot": "12.00",
  438. "tipe": "4",
  439. "attachment": "n",
  440. "status": "y",
  441. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  442. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  443. "created_at": "2022-09-10 05:08:33",
  444. "updated_at": "2022-09-10 05:08:33",
  445. "template_tipe_input": "numeric",
  446. "tampilkan_sub": "n",
  447. "passing_grade": "7",
  448. "order_no": "1",
  449. "template_syarat_parent_id": 196,
  450. "sub": "1.1",
  451. "template_syarat_id": 197,
  452. "nilai": null,
  453. "scoring_teknis_id": null,
  454. "child_count": 0,
  455. "pengalaman": []
  456. },
  457. {
  458. "id": 148,
  459. "uuid": "0f43203d-f4b9-459a-9f58-3267276a995a",
  460. "proposal_tender_id": 14,
  461. "description": "Pengalaman perusahaan di perusahaan Swasta dalam 3 Tahun terakhir (terhitung sejak 2018)",
  462. "bobot": "8.00",
  463. "tipe": "4",
  464. "attachment": "n",
  465. "status": "y",
  466. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  467. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  468. "created_at": "2022-09-10 05:08:33",
  469. "updated_at": "2022-09-10 05:08:33",
  470. "template_tipe_input": "numeric",
  471. "tampilkan_sub": "n",
  472. "passing_grade": "5",
  473. "order_no": "2",
  474. "template_syarat_parent_id": 196,
  475. "sub": "1.2",
  476. "template_syarat_id": 198,
  477. "nilai": null,
  478. "scoring_teknis_id": null,
  479. "child_count": 0,
  480. "pengalaman": []
  481. },
  482. {
  483. "id": 149,
  484. "uuid": "184621ba-f4a1-4757-af42-588ac6b74417",
  485. "proposal_tender_id": 14,
  486. "description": "Kemampuan dan Jumlah Kecukupan Tenaga Ahli",
  487. "bobot": "60.00",
  488. "tipe": "4",
  489. "attachment": "n",
  490. "status": "y",
  491. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  492. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  493. "created_at": "2022-09-10 05:08:33",
  494. "updated_at": "2022-09-10 05:08:33",
  495. "template_tipe_input": "",
  496. "tampilkan_sub": "n",
  497. "passing_grade": "0",
  498. "order_no": "2",
  499. "template_syarat_parent_id": null,
  500. "sub": "2",
  501. "template_syarat_id": 199,
  502. "nilai": null,
  503. "scoring_teknis_id": null,
  504. "child_count": 3,
  505. "pengalaman": []
  506. },
  507. {
  508. "id": 150,
  509. "uuid": "9ac0fff3-814d-45aa-a0d4-f19173777f13",
  510. "proposal_tender_id": 14,
  511. "description": "Jumlah Pengalaman Tenaga Ahli Engagement Partner",
  512. "bobot": null,
  513. "tipe": "4",
  514. "attachment": "n",
  515. "status": "y",
  516. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  517. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  518. "created_at": "2022-09-10 05:08:33",
  519. "updated_at": "2022-09-10 05:08:33",
  520. "template_tipe_input": "",
  521. "tampilkan_sub": "n",
  522. "passing_grade": "0",
  523. "order_no": "1",
  524. "template_syarat_parent_id": 199,
  525. "sub": "2.1",
  526. "template_syarat_id": 200,
  527. "nilai": null,
  528. "scoring_teknis_id": null,
  529. "child_count": 3,
  530. "pengalaman": []
  531. },
  532. {
  533. "id": 151,
  534. "uuid": "65b7eb34-e8f1-4de8-b89d-06093b3648d9",
  535. "proposal_tender_id": 14,
  536. "description": "Jumlah Tenaga Ahli Engagement Partner yang didedikasikan dalam proyek ini",
  537. "bobot": "7.00",
  538. "tipe": "4",
  539. "attachment": "n",
  540. "status": "y",
  541. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  542. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  543. "created_at": "2022-09-10 05:08:33",
  544. "updated_at": "2022-09-10 05:08:33",
  545. "template_tipe_input": "numeric",
  546. "tampilkan_sub": "n",
  547. "passing_grade": "4",
  548. "order_no": "1",
  549. "template_syarat_parent_id": 200,
  550. "sub": "2.1.1",
  551. "template_syarat_id": 201,
  552. "nilai": null,
  553. "scoring_teknis_id": null,
  554. "child_count": 0,
  555. "pengalaman": []
  556. },
  557. {
  558. "id": 152,
  559. "uuid": "d6a18b0a-08d5-43f8-a741-088bd31f0ead",
  560. "proposal_tender_id": 14,
  561. "description": "Lama Pengalaman Kerja (Tahun)",
  562. "bobot": "8.00",
  563. "tipe": "4",
  564. "attachment": "n",
  565. "status": "y",
  566. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  567. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  568. "created_at": "2022-09-10 05:08:33",
  569. "updated_at": "2022-09-10 05:08:33",
  570. "template_tipe_input": "numeric",
  571. "tampilkan_sub": "n",
  572. "passing_grade": "5",
  573. "order_no": "2",
  574. "template_syarat_parent_id": 200,
  575. "sub": "2.1.2",
  576. "template_syarat_id": 202,
  577. "nilai": null,
  578. "scoring_teknis_id": null,
  579. "child_count": 0,
  580. "pengalaman": []
  581. },
  582. {
  583. "id": 153,
  584. "uuid": "a065a50c-8e78-4099-9b14-f9f1df92f32a",
  585. "proposal_tender_id": 14,
  586. "description": "Jumlah Keterlibatan sebagai Agen Pemantau penerbit surat utang yang diterbitkan",
  587. "bobot": "13.00",
  588. "tipe": "4",
  589. "attachment": "n",
  590. "status": "y",
  591. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  592. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  593. "created_at": "2022-09-10 05:08:33",
  594. "updated_at": "2022-09-10 05:08:33",
  595. "template_tipe_input": "numeric",
  596. "tampilkan_sub": "n",
  597. "passing_grade": "8",
  598. "order_no": "3",
  599. "template_syarat_parent_id": 200,
  600. "sub": "2.1.3",
  601. "template_syarat_id": 203,
  602. "nilai": null,
  603. "scoring_teknis_id": null,
  604. "child_count": 0,
  605. "pengalaman": []
  606. },
  607. {
  608. "id": 154,
  609. "uuid": "df49ca20-faa3-4713-91d4-e2b9c5848d4a",
  610. "proposal_tender_id": 14,
  611. "description": "Jumlah Pengalaman Tenaga Ahli Senior Associate",
  612. "bobot": null,
  613. "tipe": "4",
  614. "attachment": "n",
  615. "status": "y",
  616. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  617. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  618. "created_at": "2022-09-10 05:08:33",
  619. "updated_at": "2022-09-10 05:08:33",
  620. "template_tipe_input": "",
  621. "tampilkan_sub": "n",
  622. "passing_grade": "0",
  623. "order_no": "2",
  624. "template_syarat_parent_id": 199,
  625. "sub": "2.2",
  626. "template_syarat_id": 204,
  627. "nilai": null,
  628. "scoring_teknis_id": null,
  629. "child_count": 3,
  630. "pengalaman": []
  631. },
  632. {
  633. "id": 155,
  634. "uuid": "2e27d79c-cc61-41ef-822d-d44408c8febe",
  635. "proposal_tender_id": 14,
  636. "description": "Jumlah Tenaga Ahli Senior Associate yang didedikasikan dalam proyek ini",
  637. "bobot": "5.00",
  638. "tipe": "4",
  639. "attachment": "n",
  640. "status": "y",
  641. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  642. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  643. "created_at": "2022-09-10 05:08:33",
  644. "updated_at": "2022-09-10 05:08:33",
  645. "template_tipe_input": "numeric",
  646. "tampilkan_sub": "n",
  647. "passing_grade": "3",
  648. "order_no": "1",
  649. "template_syarat_parent_id": 204,
  650. "sub": "2.2.1",
  651. "template_syarat_id": 205,
  652. "nilai": null,
  653. "scoring_teknis_id": null,
  654. "child_count": 0,
  655. "pengalaman": []
  656. },
  657. {
  658. "id": 156,
  659. "uuid": "51e75db5-a01e-49ca-899f-9aef46d1bcc8",
  660. "proposal_tender_id": 14,
  661. "description": "Lama Pengalaman Kerja (Tahun)",
  662. "bobot": "7.00",
  663. "tipe": "4",
  664. "attachment": "n",
  665. "status": "y",
  666. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  667. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  668. "created_at": "2022-09-10 05:08:33",
  669. "updated_at": "2022-09-10 05:08:33",
  670. "template_tipe_input": "numeric",
  671. "tampilkan_sub": "n",
  672. "passing_grade": "4",
  673. "order_no": "2",
  674. "template_syarat_parent_id": 204,
  675. "sub": "2.2.2",
  676. "template_syarat_id": 206,
  677. "nilai": null,
  678. "scoring_teknis_id": null,
  679. "child_count": 0,
  680. "pengalaman": []
  681. },
  682. {
  683. "id": 157,
  684. "uuid": "3ee21025-1a64-470f-af1a-7a28ee55b76e",
  685. "proposal_tender_id": 14,
  686. "description": "Jumlah Keterlibatan sebagai Agen Pemantau penerbit surat utang yang diterbitkan",
  687. "bobot": "7.00",
  688. "tipe": "4",
  689. "attachment": "n",
  690. "status": "y",
  691. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  692. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  693. "created_at": "2022-09-10 05:08:33",
  694. "updated_at": "2022-09-10 05:08:33",
  695. "template_tipe_input": "numeric",
  696. "tampilkan_sub": "n",
  697. "passing_grade": "4",
  698. "order_no": "3",
  699. "template_syarat_parent_id": 204,
  700. "sub": "2.2.3",
  701. "template_syarat_id": 208,
  702. "nilai": null,
  703. "scoring_teknis_id": null,
  704. "child_count": 0,
  705. "pengalaman": []
  706. },
  707. {
  708. "id": 158,
  709. "uuid": "2f3182ed-d123-47ef-a4a1-89087a83ac18",
  710. "proposal_tender_id": 14,
  711. "description": "Jumlah Pengalaman Junior Associate",
  712. "bobot": null,
  713. "tipe": "4",
  714. "attachment": "n",
  715. "status": "y",
  716. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  717. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  718. "created_at": "2022-09-10 05:08:33",
  719. "updated_at": "2022-09-10 05:08:33",
  720. "template_tipe_input": "",
  721. "tampilkan_sub": "n",
  722. "passing_grade": "0",
  723. "order_no": "3",
  724. "template_syarat_parent_id": 199,
  725. "sub": "2.3",
  726. "template_syarat_id": 209,
  727. "nilai": null,
  728. "scoring_teknis_id": null,
  729. "child_count": 3,
  730. "pengalaman": []
  731. },
  732. {
  733. "id": 159,
  734. "uuid": "6f938e7f-ea6d-4579-af7a-65b48434714e",
  735. "proposal_tender_id": 14,
  736. "description": "Jumlah Junior Associate yang didedikasikan dalam proyek ini",
  737. "bobot": "3.00",
  738. "tipe": "4",
  739. "attachment": "n",
  740. "status": "y",
  741. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  742. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  743. "created_at": "2022-09-10 05:08:33",
  744. "updated_at": "2022-09-10 05:08:33",
  745. "template_tipe_input": "numeric",
  746. "tampilkan_sub": "n",
  747. "passing_grade": "2",
  748. "order_no": "1",
  749. "template_syarat_parent_id": 209,
  750. "sub": "2.3.1",
  751. "template_syarat_id": 210,
  752. "nilai": null,
  753. "scoring_teknis_id": null,
  754. "child_count": 0,
  755. "pengalaman": []
  756. },
  757. {
  758. "id": 160,
  759. "uuid": "b4f8568f-9505-4928-a3b7-923f931d26ff",
  760. "proposal_tender_id": 14,
  761. "description": "Lama Pengalaman Kerja (Tahun)",
  762. "bobot": "3.00",
  763. "tipe": "4",
  764. "attachment": "n",
  765. "status": "y",
  766. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  767. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  768. "created_at": "2022-09-10 05:08:33",
  769. "updated_at": "2022-09-10 05:08:33",
  770. "template_tipe_input": "numeric",
  771. "tampilkan_sub": "n",
  772. "passing_grade": "2",
  773. "order_no": "2",
  774. "template_syarat_parent_id": 209,
  775. "sub": "2.3.2",
  776. "template_syarat_id": 211,
  777. "nilai": null,
  778. "scoring_teknis_id": null,
  779. "child_count": 0,
  780. "pengalaman": []
  781. },
  782. {
  783. "id": 161,
  784. "uuid": "e6bbfec6-8750-43ba-99e3-140a08397ace",
  785. "proposal_tender_id": 14,
  786. "description": "Jumlah Keterlibatan sebagai Agen Pemantau penerbit surat utang yang diterbitkan",
  787. "bobot": "7.00",
  788. "tipe": "4",
  789. "attachment": "n",
  790. "status": "y",
  791. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  792. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  793. "created_at": "2022-09-10 05:08:33",
  794. "updated_at": "2022-09-10 05:08:33",
  795. "template_tipe_input": "numeric",
  796. "tampilkan_sub": "n",
  797. "passing_grade": "4",
  798. "order_no": "3",
  799. "template_syarat_parent_id": 209,
  800. "sub": "2.3.3",
  801. "template_syarat_id": 212,
  802. "nilai": null,
  803. "scoring_teknis_id": null,
  804. "child_count": 0,
  805. "pengalaman": []
  806. },
  807. {
  808. "id": 162,
  809. "uuid": "5ee3ef0f-40d0-4c85-abf0-b88be3626e85",
  810. "proposal_tender_id": 14,
  811. "description": "Metodologi (bila diperlukan beauty contest)",
  812. "bobot": "20.00",
  813. "tipe": "4",
  814. "attachment": "n",
  815. "status": "y",
  816. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  817. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  818. "created_at": "2022-09-10 05:08:33",
  819. "updated_at": "2022-09-10 05:08:33",
  820. "template_tipe_input": "numeric",
  821. "tampilkan_sub": "n",
  822. "passing_grade": "12",
  823. "order_no": "3",
  824. "template_syarat_parent_id": null,
  825. "sub": "3",
  826. "template_syarat_id": 213,
  827. "nilai": null,
  828. "scoring_teknis_id": null,
  829. "child_count": 0,
  830. "pengalaman": []
  831. },
  832. {
  833. "id": 163,
  834. "uuid": "94cefba5-d8a9-414a-bdb9-44134d52984c",
  835. "proposal_tender_id": 14,
  836. "description": "Lain-lain",
  837. "bobot": null,
  838. "tipe": "4",
  839. "attachment": "n",
  840. "status": "y",
  841. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  842. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  843. "created_at": "2022-09-10 05:08:33",
  844. "updated_at": "2022-09-10 05:08:33",
  845. "template_tipe_input": "numeric",
  846. "tampilkan_sub": "n",
  847. "passing_grade": "0",
  848. "order_no": "4",
  849. "template_syarat_parent_id": null,
  850. "sub": "4",
  851. "template_syarat_id": 228,
  852. "nilai": null,
  853. "scoring_teknis_id": null,
  854. "child_count": 0,
  855. "pengalaman": []
  856. }
  857. ],
  858. "kemampuan_pasok": [
  859. {
  860. "material_group": null,
  861. "sos_item": null,
  862. "sos_header": null,
  863. "buyer_name": "",
  864. "purchasing_org_name": null,
  865. "company_name": null
  866. }
  867. ],
  868. "status_bid_opening": [
  869. {
  870. "registration_status": "register",
  871. "registration_note": null,
  872. "registration_quotation": "register",
  873. "registration_quotation_note": null,
  874. "buyer_name": "",
  875. "purchasing_org_name": null,
  876. "company_name": null
  877. }
  878. ],
  879. "bid_opening": [],
  880. "evaluasi": [],
  881. "uuid_negosiasi": null,
  882. "negosiasi": [],
  883. "awarding": [],
  884. "awarding_status": "d",
  885. "awarding_status_text": "open",
  886. "berita_acara": [],
  887. "bo_start_date": {
  888. "id": 388,
  889. "uuid": "d745cddb-cb3d-478e-94e8-5d3dcc94b7d9",
  890. "jadwal_tender_id": 8,
  891. "jadwal_tender_name": "Quotation",
  892. "start_date": "2022-09-10",
  893. "end_date": "2022-09-10",
  894. "start_time": "05:01:00",
  895. "end_time": "19:00:00",
  896. "proposal_tender_id": 14,
  897. "status": "y",
  898. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  899. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  900. "created_at": "2022-09-10 05:08:33",
  901. "updated_at": "2022-09-10 06:49:04",
  902. "jadwal_tender_code": "JT004"
  903. },
  904. "vendor_nego": [],
  905. "dokumen_pakta_integritas": {
  906. "vendor_id": "00000090",
  907. "file": "Dokumen_tes_1662692951.pdf",
  908. "status_approval": "setuju",
  909. "buyer_name": "",
  910. "purchasing_org_name": null,
  911. "company_name": null
  912. },
  913. "aanwijzing_ba": [],
  914. "buyer_name": "Parlindungan Nasution",
  915. "purchasing_org_name": "PT. Perusahaan Pengelolaan Aset",
  916. "company_name": "PT. Perusahaan Pengelolaan Aset",
  917. "schedules": [
  918. {
  919. "id": 385,
  920. "uuid": "d9db6588-eefb-4207-a5a3-00c361b40c37",
  921. "jadwal_tender_id": 5,
  922. "jadwal_tender_name": "Pengumuman",
  923. "start_date": "2022-09-10",
  924. "end_date": "2022-09-10",
  925. "start_time": "05:01:00",
  926. "end_time": "19:00:00",
  927. "proposal_tender_id": 14,
  928. "status": "y",
  929. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  930. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  931. "created_at": "2022-09-10 05:08:33",
  932. "updated_at": "2022-09-10 06:44:21",
  933. "jadwal_tender_code": "JT001"
  934. },
  935. {
  936. "id": 386,
  937. "uuid": "484d9272-2925-49a2-8cb1-35ae2ee724ae",
  938. "jadwal_tender_id": 6,
  939. "jadwal_tender_name": "Registrasi",
  940. "start_date": "2022-09-10",
  941. "end_date": "2022-09-10",
  942. "start_time": "05:01:00",
  943. "end_time": "19:00:00",
  944. "proposal_tender_id": 14,
  945. "status": "y",
  946. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  947. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  948. "created_at": "2022-09-10 05:08:33",
  949. "updated_at": "2022-09-10 06:46:22",
  950. "jadwal_tender_code": "JT002"
  951. },
  952. {
  953. "id": 387,
  954. "uuid": "e6f49804-50de-4e1e-aa95-19f3f22ca06f",
  955. "jadwal_tender_id": 7,
  956. "jadwal_tender_name": "Aanwijzing",
  957. "start_date": "2022-09-10",
  958. "end_date": "2022-09-10",
  959. "start_time": "05:01:00",
  960. "end_time": "19:00:00",
  961. "proposal_tender_id": 14,
  962. "status": "y",
  963. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  964. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  965. "created_at": "2022-09-10 05:08:33",
  966. "updated_at": "2022-09-10 06:47:57",
  967. "jadwal_tender_code": "JT003"
  968. },
  969. {
  970. "id": 388,
  971. "uuid": "d745cddb-cb3d-478e-94e8-5d3dcc94b7d9",
  972. "jadwal_tender_id": 8,
  973. "jadwal_tender_name": "Quotation",
  974. "start_date": "2022-09-10",
  975. "end_date": "2022-09-10",
  976. "start_time": "05:01:00",
  977. "end_time": "19:00:00",
  978. "proposal_tender_id": 14,
  979. "status": "y",
  980. "created_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  981. "updated_by": "95c5901d-0ae6-4ff9-ada4-6d6b4afc1516",
  982. "created_at": "2022-09-10 05:08:33",
  983. "updated_at": "2022-09-10 06:49:04",
  984. "jadwal_tender_code": "JT004"
  985. }
  986. ],
  987. "panitia_pengadaans": [],
  988. "metode_pengadaan": {
  989. "id": 2,
  990. "uuid": "b29e0737-756b-46d1-ad82-50a07d9ba812",
  991. "name": "Tender/Seleksi Terbatas",
  992. "status": "y",
  993. "created_by": null,
  994. "updated_by": null,
  995. "created_at": null,
  996. "updated_at": null,
  997. "tender_umum": "n",
  998. "kuorum": 2,
  999. "pra_qualification": "y",
  1000. "company_id": "A000",
  1001. "max_limit": null,
  1002. "company_name": "PT. Perusahaan Pengelolaan Aset",
  1003. "created_by_name": "",
  1004. "updated_by_name": ""
  1005. },
  1006. "metode_aanwijzing": {
  1007. "id": 2,
  1008. "uuid": "0f63c333-893a-4132-833e-be6a67eb8e87",
  1009. "name": "Aanwijzing Video Conference",
  1010. "status": "y",
  1011. "created_by": null,
  1012. "updated_by": "77eea109-8f81-4996-aad2-e34ad11b4e42",
  1013. "created_at": null,
  1014. "updated_at": "2022-02-25 08:22:33"
  1015. },
  1016. "metode_penyampaian": {
  1017. "id": "2s",
  1018. "uuid": "a13ee79a-a534-4f92-9293-2a55ba0e699c",
  1019. "name": "2 Amplop",
  1020. "status": "y",
  1021. "created_by": null,
  1022. "updated_by": "77eea109-8f81-4996-aad2-e34ad11b4e42",
  1023. "created_at": null,
  1024. "updated_at": "2022-06-06 09:36:27"
  1025. }
  1026. }
  1027. }
  1028. // .then((resp) => {
  1029. const data = resp.data;
  1030. const setHeader = {...this.state.quotation.header}
  1031. setHeader.ambang_batas = data.ambang_batas;
  1032. setHeader.approved_at = data.approved_at;
  1033. setHeader.bid_bond = data.bid_bond;
  1034. setHeader.bid_bond_value = data.bid_bond_value;
  1035. setHeader.bobot_komersil = data.bobot_komersil;
  1036. setHeader.bobot_teknis = data.bobot_teknis;
  1037. setHeader.created_at = data.created_at;
  1038. setHeader.created_by = data.created_by;
  1039. setHeader.delivery_location = data.delivery_location;
  1040. setHeader.delivery_time = data.delivery_time;
  1041. setHeader.id = data.id;
  1042. setHeader.incoterm_id = data.incoterm_id;
  1043. setHeader.lingkup_pekerjaan = data.lingkup_pekerjaan;
  1044. setHeader.masa_berlaku = data.masa_berlaku;
  1045. setHeader.metode_aanwijzing_id = data.metode_aanwijzing_id;
  1046. setHeader.metode_evaluasi = data.metode_evaluasi;
  1047. setHeader.metode_negosiasi = data.metode_negosiasi;
  1048. setHeader.metode_pengadaan_id = data.metode_pengadaan_id;
  1049. setHeader.metode_penyampaian_id = data.metode_penyampaian_id;
  1050. setHeader.multiwinner = data.multiwinner;
  1051. setHeader.note_external = data.note_external;
  1052. setHeader.note_internal = data.note_internal;
  1053. setHeader.number = data.number;
  1054. setHeader.order_placement = data.order_placement;
  1055. setHeader.pra_qualification = data.pra_qualification;
  1056. setHeader.purchasing_group_id = data.purchasing_group_id;
  1057. setHeader.purchasing_org_id = data.purchasing_org_id;
  1058. setHeader.purchasing_org_name = data.purchasing_org_name;
  1059. setHeader.reference = data.reference;
  1060. setHeader.status = data.status;
  1061. setHeader.status_aanwijzing = data.status_aanwijzing;
  1062. setHeader.status_text = data.status_text;
  1063. setHeader.title = data.title;
  1064. setHeader.updated_at = data.updated_at;
  1065. setHeader.updated_by = data.updated_by;
  1066. setHeader.uuid = data.uuid;
  1067. setHeader.visibilitas_bid_open = data.visibilitas_bid_open;
  1068. setHeader.metode_aanwijzing = data.metode_aanwijzing;
  1069. setHeader.metode_pengadaan = data.metode_pengadaan;
  1070. setHeader.metode_penyampaian = data.metode_penyampaian;
  1071. setHeader.current_step = data.current_step;
  1072. setHeader.company_name = data.company_name;
  1073. setHeader.link_conference = data.link_conference;
  1074. let arr = [];
  1075. let terms_arr = [];
  1076. if(data.items.length > 0){
  1077. data.items.sort((a,b) => a.proposal_tender_item_id-b.proposal_tender_item_id).sort((a,b) => a.purchasing_requisition_item_id-b.purchasing_requisition_item_id).forEach((item, key) => {
  1078. const obj = {
  1079. id: item.pr_item_id,
  1080. value: '',
  1081. child: (item.service_lines && item.service_lines.length > 0) ?
  1082. item.service_lines.map(child => {
  1083. return {
  1084. id: child.purchasing_requisition_item_id,
  1085. uuid: child.uuid,
  1086. value: ''
  1087. }
  1088. })
  1089. : []
  1090. }
  1091. arr.push(obj)
  1092. })
  1093. }
  1094.  
  1095. if(data.metode_penyampaian_id === '2t' && parseInt(data.current_step) === 1){
  1096. if(data.terms.length > 0){
  1097. data.terms.forEach((item, key) => {
  1098. if(item.tipe !== '6'){
  1099. terms_arr.push(item)
  1100. }
  1101. })
  1102. }
  1103. } else {
  1104. terms_arr = data.terms;
  1105. }
  1106.  
  1107. const newFormTeknis = [];
  1108. // console.log("form_teknis", data.form_teknis);
  1109. if(data.form_teknis && data.form_teknis.length > 0){
  1110. data.form_teknis.forEach(item => {
  1111. const pengalaman = item.template_tipe_input !== null && item.template_tipe_input === "numeric" ? [{
  1112. template_tipe_input: item.template_tipe_input,
  1113. proposal_tender_syarat_id: item.id,
  1114. numeric: isNaN(parseInt(item.nilai)) ? 0 : parseInt(item.nilai)
  1115. }] : item?.pengalaman;
  1116. const propertyValues = Array.isArray(pengalaman) ? pengalaman : Object.values(pengalaman);
  1117. newFormTeknis.push({
  1118. attachment: item.attachment,
  1119. bobot: item.bobot,
  1120. created_at: item.created_at,
  1121. created_by: item.created_by,
  1122. description: item.description,
  1123. nilai: item.nilai,
  1124. id: item.id,
  1125. order_no: item.order_no,
  1126. passing_grade: item.passing_grade,
  1127. proposal_tender_id: item.proposal_tender_id,
  1128. status: item.status,
  1129. sub: item.sub,
  1130. sub_order: item.sub !== undefined && item.sub !== null && item.sub !== '' ? item.sub.length > 1 ? `${item.sub}.0` : `${item.sub}.0` : '',
  1131. tampilkan_sub: item.tampilkan_sub,
  1132. template_syarat_id: item.template_syarat_id,
  1133. template_syarat_parent_id: item.template_syarat_parent_id,
  1134. template_tipe_input: item.template_tipe_input,
  1135. tipe: item.tipe,
  1136. updated_at: item.updated_at,
  1137. updated_by: item.updated_by,
  1138. uuid: item.uuid,
  1139. aspek_teknis: propertyValues,
  1140. })
  1141. })
  1142. }
  1143.  
  1144. this.setState(({ loadings, quotation }) => ({
  1145. loadings: { ...loadings, button: false, items: false },
  1146. quotation : {
  1147. ...quotation,
  1148. errors: [],
  1149. items: data.items.sort((a,b) => a.proposal_tender_item_id-b.proposal_tender_item_id).sort((a,b) => a.purchasing_requisition_item_id-b.purchasing_requisition_item_id),
  1150. schedules: data.schedules,
  1151. terms: terms_arr,
  1152. attachments: data.attachments,
  1153. form_teknis: newFormTeknis.sort(compareSemanticVersions('sub_order')),
  1154. header: setHeader,
  1155. tempQuotes: arr
  1156. }
  1157. }), () => {
  1158. this.fetchPurchasingOrg({id: data.purchasing_org_id})
  1159. if(this.state.paramType === 'update'){
  1160. this.getVendorQuotation(this.state.paramId)
  1161. }
  1162. });
  1163.  
  1164. // })
  1165. // .catch((resp) => {
  1166. // this.setState(({ loadings }) => ({ loadings: { ...loadings, items: false, button: false } }));
  1167. // toastr.error(resp.data.status, resp.data.message);
  1168. // });
  1169. }
  1170. }
  1171.  
  1172. getVendorQuotation = (uuid, params) => {
  1173. if(this._isMounted){
  1174. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: true, items: true } }));
  1175. this.props.getVendorQuotation(uuid, params)
  1176. .then((resp) => {
  1177. let arr = [];
  1178. let arr_quotes = [];
  1179. toastr.success(resp.data.status, resp.data.message);
  1180. const data = resp.data.data;
  1181. if(data.items.length > 0){
  1182. data.items.sort((a,b) => a.proposal_tender_item_id-b.proposal_tender_item_id).sort((a,b) => a.purchasing_requisition_item_id-b.purchasing_requisition_item_id).forEach((item, key) => {
  1183. // const pt_items = this.state.quotation.items.filter( i => i.pr_item_id === item.purchasing_requisition_item_id)
  1184. const obj = {
  1185. created_at: item.created_at,
  1186. created_by: item.created_by,
  1187. delivery_time: item.delivery_time,
  1188. id: item.id,
  1189. proposal_tender_item_id: item.proposal_tender_item_id,
  1190. purchasing_requisition_item_id: item.purchasing_requisition_item_id,
  1191. proposal_tender_item_uuid: item.proposal_tender_item_uuid,
  1192. qty: item.qty,
  1193. quotation_id: item.quotation_id,
  1194. quote: item.quote,
  1195. remark: item.remark,
  1196. long_text: item.spesifikasi,
  1197. short_text: item.short_text,
  1198. uom: item.uom,
  1199. status: item.status,
  1200. updated_at: item.updated_at,
  1201. updated_by: item.updated_by,
  1202. uuid: item.uuid,
  1203. valuation_price: item.valuation_price,
  1204. service_lines: item.services_lines !== undefined ? item.services_lines.length > 0 ? item.services_lines : [] : [],
  1205. tipe: item.services_lines !== undefined ? item.services_lines.length > 0 ? 'jasa' : 'barang' : 'barang',
  1206. }
  1207. arr.push(obj)
  1208. const objQuote = {
  1209. id: item.purchasing_requisition_item_id,
  1210. value: item.quote,
  1211. child: item.services_lines !== undefined ?
  1212. item.services_lines.length > 0 ?
  1213. item.services_lines.map(child => {
  1214. return {
  1215. id: child.purchasing_requisition_item_id,
  1216. uuid: child.uuid,
  1217. value: item.quote
  1218. }
  1219. })
  1220. : []
  1221. : []
  1222. }
  1223. arr_quotes.push(objQuote)
  1224. })
  1225. }
  1226.  
  1227. this.setState(({ loadings, tempData, quotation }) => ({
  1228. loadings: { ...loadings, button: false, items: false },
  1229. quotation : {
  1230. ...quotation,
  1231. tempQuotes: arr_quotes
  1232. },
  1233. tempData : {
  1234. ...tempData,
  1235. errors: [],
  1236. bidbond: data.bidbond,
  1237. bidbond_file: data.bidbond_file,
  1238. bidbond_validity: data.bidbond_validity,
  1239. date: data.date,
  1240. location: data.location,
  1241. note: data.note,
  1242. number: data.number,
  1243. validity: data.validity,
  1244. incoterm_id: (data.incoterm_id===null) ? null : {value: data.incoterm_id, label: `${data.incoterm_id} - ${data.incoterm_name}`},
  1245. items: arr.sort((a,b) => a.proposal_tender_item_id-b.proposal_tender_item_id).sort((a,b) => a.purchasing_requisition_item_id-b.purchasing_requisition_item_id),
  1246. terms: data.attachments,
  1247. }
  1248. }));
  1249. })
  1250. .catch((resp) => {
  1251. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: false }, sendData: {} }));
  1252. toastr.error(resp.data.status, resp.data.message);
  1253. this.props.history.push(`/task-vendor/quotation`)
  1254. });
  1255. }
  1256. }
  1257.  
  1258. fetchPurchasingOrg = (params) => {
  1259. if(this._isMounted){
  1260. // this.props.fetchPurchasingOrg(params)
  1261. const resp = {
  1262. "status": "success",
  1263. "message": "Berhasil mendapatkan data.",
  1264. "draw": 0,
  1265. "recordsTotal": 0,
  1266. "recordsFiltered": 0,
  1267. "data": [],
  1268. "queries": [
  1269. {
  1270. "query": "select count(*) as aggregate from (select * from (select \"purchasing_orgs\".*, \"companies\".\"name\" as \"company_name\" from \"purchasing_orgs\" left join \"companies\" on \"purchasing_orgs\".\"company_id\" = \"companies\".\"id\" order by \"purchasing_orgs\".\"id\" asc) as purchasing_orgs where \"company_id\" is null) count_row_table",
  1271. "bindings": [],
  1272. "time": 1
  1273. },
  1274. {
  1275. "query": "select * from (select \"purchasing_orgs\".*, \"companies\".\"name\" as \"company_name\" from \"purchasing_orgs\" left join \"companies\" on \"purchasing_orgs\".\"company_id\" = \"companies\".\"id\" order by \"purchasing_orgs\".\"id\" asc) as purchasing_orgs where \"company_id\" is null",
  1276. "bindings": [],
  1277. "time": 0.43
  1278. }
  1279. ],
  1280. "input": {
  1281. "id": "A000"
  1282. }
  1283. }
  1284. // .then((resp) => {
  1285. const data = resp.data[0]
  1286. this.setState(({ pakta_integritas }) => ({ pakta_integritas: { ...pakta_integritas, purchasing_org: data } }));
  1287. // })
  1288. // .catch((resp) => {
  1289. // const errors = resp.data.errors;
  1290. // if(errors){
  1291. // var msg = Object.keys(errors).map((key) => { return <li key={key}>{errors[key]}</li> });
  1292. // const toastr_msg = {component: ( <React.Fragment><ul>{msg}</ul></React.Fragment> )};
  1293. // if(typeof errors === 'string'){ toastr.error(resp.data.message, errors); } else { toastr.error(resp.data.message, toastr_msg); }
  1294. // } else {
  1295. // toastr.error(resp.data.message);
  1296. // }
  1297. // });
  1298. }
  1299. }
  1300.  
  1301. submitVendorQuotation = (params) => {
  1302. if(this._isMounted){
  1303. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: true } }));
  1304. this.props.submitVendorQuotation(this.state.paramId, params)
  1305. .then((resp) => {
  1306. toastr.success(resp.data.status, resp.data.message);
  1307. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: false }, modalOpen: false, sendData: {} }));
  1308. this.props.history.push(`/task-vendor/quotation`)
  1309. })
  1310. .catch((resp) => {
  1311. this.setState(({ loadings, quotation }) => (
  1312. {
  1313. loadings: { ...loadings, button: false, errors: resp.data.errors },
  1314. quotation: { ...quotation, errors: (resp.data.errors===undefined ? [] : resp.data.errors) },
  1315. modalOpen: false,
  1316. sendData: {}
  1317. }
  1318. ));
  1319. const errors = resp.data.errors;
  1320. if(errors){
  1321. var msg = Object.keys(errors).map((key) => { return <li key={key}>{errors[key]}</li> });
  1322. const toastr_msg = {component: ( <React.Fragment><ul>{msg}</ul></React.Fragment> )};
  1323. if(typeof errors === 'string'){ toastr.error(resp.data.message, errors); } else { toastr.error(resp.data.message, toastr_msg); }
  1324. } else {
  1325. toastr.error(resp.data.message);
  1326. }
  1327. });
  1328. }
  1329. }
  1330.  
  1331. updateVendorQuotation = (params) => {
  1332. if(this._isMounted){
  1333. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: true } }));
  1334. this.props.updateVendorQuotation(this.state.paramId, params)
  1335. .then((resp) => {
  1336. toastr.success(resp.data.status, resp.data.message);
  1337. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: false }, modalOpen: false, sendData: {} }));
  1338. this.props.history.push(`/task-vendor/quotation`)
  1339. })
  1340. .catch((resp) => {
  1341. this.setState(({ loadings, quotation }) => (
  1342. {
  1343. loadings: { ...loadings, button: false, errors: resp.data.errors },
  1344. quotation: { ...quotation, errors: (resp.data.errors===undefined ? [] : resp.data.errors) },
  1345. modalOpen: false,
  1346. sendData: {}
  1347. }
  1348. ));
  1349. const errors = resp.data?.errors;
  1350. if(errors){
  1351. var msg = Object.keys(errors).map((key) => { return <li key={key}>{errors[key]}</li> });
  1352. const toastr_msg = {component: ( <React.Fragment><ul>{msg}</ul></React.Fragment> )};
  1353. if(typeof errors === 'string'){ toastr.error(resp.data.message, errors); } else { toastr.error(resp.data.message, toastr_msg); }
  1354. } else {
  1355. toastr.error(resp.data.message);
  1356. }
  1357. });
  1358. }
  1359. }
  1360.  
  1361. toggleClose = () => {
  1362. this.setState({ modalOpen: false, sendData: {} })
  1363. }
  1364.  
  1365. toggleOpen = (data) => {
  1366. this.setState({ modalOpen: true, sendData: data })
  1367. }
  1368.  
  1369. toggleCloseNumeric = () => {
  1370. this.setState({ modalOpenNumeric: false, selectedTeknis: '' })
  1371. }
  1372.  
  1373. toggleOpenNumeric = (data) => {
  1374. this.setState({ modalOpenNumeric: true, selectedTeknis: data })
  1375. }
  1376. toggleClosePengalaman = () => {
  1377. this.setState({ modalOpenPengalaman: false, selectedTeknis: '' })
  1378. }
  1379.  
  1380. toggleOpenPengalaman = (data) => {
  1381. this.setState({ modalOpenPengalaman: true, selectedTeknis: data })
  1382. }
  1383. toggleCloseTenagaAhli = () => {
  1384. this.setState({ modalOpenTenagaAhli: false, selectedTeknis: '' })
  1385. }
  1386.  
  1387. toggleOpenTenagaAhli = (data) => {
  1388. this.setState({ modalOpenTenagaAhli: true, selectedTeknis: data })
  1389. }
  1390.  
  1391. submitAspekTeknis = (payload, type) => {
  1392. let data = this.state.quotation.form_teknis[this.state.selectedTeknis]
  1393. let aspek_teknis = data.aspek_teknis === undefined ? [] : type === 'numeric' ? [] : data.aspek_teknis;
  1394. aspek_teknis.push(payload);
  1395. data.aspek_teknis = aspek_teknis;
  1396. this.state.quotation.form_teknis[this.state.selectedTeknis] = data;
  1397. // console.log("this.state.quotation.form_teknis", this.state.quotation.form_teknis);
  1398. }
  1399.  
  1400. removeAspekTeknis = (id) => {
  1401. let data = this.state.quotation.form_teknis[this.state.selectedTeknis];
  1402. let aspek_teknis = data.aspek_teknis === undefined ? [] : data.aspek_teknis;
  1403. aspek_teknis.splice(id, 1);
  1404. data.aspek_teknis = aspek_teknis;
  1405. this.state.quotation.form_teknis[this.state.selectedTeknis] = data;
  1406. };
  1407.  
  1408. editAspekTeknis = (index, type, value) => {
  1409. let data = this.state.quotation.form_teknis[this.state.selectedTeknis]
  1410. let aspek_teknis = data.aspek_teknis === undefined ? [] : type === 'numeric' ? [] : data.aspek_teknis;
  1411. aspek_teknis[index] = value;
  1412. data.aspek_teknis = aspek_teknis;
  1413. this.state.quotation.form_teknis[this.state.selectedTeknis] = data;
  1414. };
  1415.  
  1416. toggleSubmit = () => {
  1417. this.submitVendorQuotation(this.state.sendData);
  1418. }
  1419.  
  1420. toggleUpdate = () => {
  1421. this.updateVendorQuotation(this.state.sendData);
  1422. }
  1423.  
  1424. submitScoring = (uuid, params) => {
  1425. if(this._isMounted){
  1426. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: true } }));
  1427. this.props.submitScoring(uuid, params)
  1428. .then((resp) => {
  1429. toastr.success(resp.data.status, resp.data.message);
  1430. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: false } }));
  1431. // this.props.history.push(`/task-vendor/quotation`)
  1432. })
  1433. .catch((resp) => {
  1434. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: false } }));
  1435. const errors = resp.data.errors;
  1436. if(errors){
  1437. var msg = Object.keys(errors).map((key) => { return <li key={key}>{errors[key]}</li> });
  1438. const toastr_msg = {component: ( <React.Fragment><ul>{msg}</ul></React.Fragment> )};
  1439. if(typeof errors === 'string'){ toastr.error(resp.data.message, errors); } else { toastr.error(resp.data.message, toastr_msg); }
  1440. } else {
  1441. toastr.error(resp.data.message);
  1442. }
  1443. });
  1444. }
  1445. }
  1446.  
  1447. getScoring = (uuid, params) => {
  1448. if(this._isMounted){
  1449. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: true } }));
  1450. this.props.getScoring(uuid, params)
  1451. .then((resp) => {
  1452. toastr.success(resp.data.status, resp.data.message);
  1453. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: false } }));
  1454. // this.props.history.push(`/task-vendor/quotation`)
  1455. // console.log("resp", resp);
  1456. })
  1457. .catch((resp) => {
  1458. this.setState(({ loadings }) => ({ loadings: { ...loadings, button: false } }));
  1459. const errors = resp.data.errors;
  1460. if(errors){
  1461. var msg = Object.keys(errors).map((key) => { return <li key={key}>{errors[key]}</li> });
  1462. const toastr_msg = {component: ( <React.Fragment><ul>{msg}</ul></React.Fragment> )};
  1463. if(typeof errors === 'string'){ toastr.error(resp.data.message, errors); } else { toastr.error(resp.data.message, toastr_msg); }
  1464. } else {
  1465. toastr.error(resp.data.message);
  1466. }
  1467. });
  1468. }
  1469. }
  1470.  
  1471. onAddSyaratItemClick = () => {
  1472. this.setState({ modalOpenSyaratItem: true })
  1473. }
  1474.  
  1475. onCloseSyaratItemClick = () => {
  1476. this.setState({ modalOpenSyaratItem: false })
  1477. }
  1478.  
  1479. onEditSyaratItemClick = async (uuid) => {
  1480. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_getting: true, syarat_item_getting_uuid: uuid}}));
  1481.  
  1482. try {
  1483. // const resp = await this.props.showProposalTenderSyaratItem(uuid);
  1484. const resp = {data: {data: {
  1485. id: 1,
  1486. uuid: 'abc',
  1487. name: 'test',
  1488. year: 2022,
  1489. description: 'yyy',
  1490. }}};
  1491. this.setState({syarat_item_detail: resp.data.data, modalOpenSyaratItem: true});
  1492. } catch(err) {
  1493. toastr.error(err?.data?.message || "Opps Somethings Wrong");
  1494. } finally {
  1495. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_getting: false, syarat_item_getting_uuid: null}}));
  1496. }
  1497. }
  1498.  
  1499. onDeleteSyaratItemClick = (uuid) => {
  1500. this.setState(({swal}) => ({swal: {...swal, show: true, uuid, type: 'delete-syarat-item'}}));
  1501. }
  1502.  
  1503. fetchSyaratItem = async () => {
  1504. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_fetching: true}}));
  1505.  
  1506. try {
  1507. // const resp = await this.props.fetchProposalTenderSyaratItem();
  1508. const resp = {data: {data: [{
  1509. id: 1,
  1510. uuid: 'abc',
  1511. name: 'test',
  1512. year: 2022,
  1513. description: 'yyy',
  1514. }]}}
  1515. this.setState({syarat_item_list: resp.data.data});
  1516. } catch(err) {
  1517. toastr.error(err?.data?.message || "Opps Somethings Wrong");
  1518. } finally {
  1519. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_fetching: false}}));
  1520. }
  1521. }
  1522.  
  1523. saveSyaratItem = async (data) => {
  1524. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_creating: true}}));
  1525.  
  1526. try {
  1527. const resp = await this.props.saveProposalTenderSyaratItem(data);
  1528. toastr.success(resp.data.status, resp.data.message);
  1529.  
  1530. this.fetchSyaratItem();
  1531. } catch (err) {
  1532. toastr.error(err?.data?.message || "Opps Somethings Wrong");
  1533. } finally {
  1534. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_creating: false}}));
  1535. }
  1536. }
  1537.  
  1538. updateSyaratItem = async (data) => {
  1539. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_updating: true, syarat_item_updating_uuid: this.state.syarat_item_detail.uuid}}));
  1540.  
  1541. try {
  1542. const resp = await this.props.updateProposalTenderSyaratItem(this.state.syarat_item_detail.uuid, data);
  1543. toastr.success(resp.data.status, resp.data.message);
  1544.  
  1545. this.fetchSyaratItem();
  1546. } catch (err) {
  1547. toastr.error(err?.data?.message || "Opps Somethings Wrong");
  1548. } finally {
  1549. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_updating: false, syarat_item_updating_uuid: null}}));
  1550. }
  1551. }
  1552.  
  1553. deleteSyaratItem = async (uuid) => {
  1554. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_deleting: true, syarat_item_deleting_uuid: uuid}}));
  1555.  
  1556. try {
  1557. const resp = await this.props.deleteProposalTenderSyaratItem(uuid);
  1558. toastr.success(resp.data.status, resp.data.message);
  1559.  
  1560. this.fetchSyaratItem();
  1561. } catch (err) {
  1562. toastr.error(err?.data?.message || "Opps Somethings Wrong");
  1563. } finally {
  1564. this.setState(({loadings}) => ({loadings: {...loadings, syarat_item_deleting: false, syarat_item_deleting_uuid: null}}));
  1565. }
  1566. }
  1567.  
  1568. onSwalConfirm = () => {
  1569. const { swal } = this.state;
  1570.  
  1571. if(swal.type === 'delete-syarat-item'){
  1572. this.deleteSyaratItem(swal.uuid);
  1573. this.onSwalCancel();
  1574. }
  1575. }
  1576.  
  1577. onSwalCancel = () => {
  1578. this.setState({swal: {show: false, uuid: null, type: null}});
  1579. }
  1580.  
  1581. render(){
  1582. const {t} = this.props;
  1583.  
  1584. return (
  1585. <div id="page-quote">
  1586. <ol className="breadcrumb float-xl-right">
  1587. <li className="breadcrumb-item">Home</li>
  1588. <li className="breadcrumb-item">Task Vendor</li>
  1589. <li className="breadcrumb-item active">Quotation</li>
  1590. </ol>
  1591. <h1 className="page-header">Quotation </h1>
  1592. <Form
  1593. parentState={this.state}
  1594. parentProps={this.props}
  1595. loadings={this.state.loadings}
  1596. upload={this.props.fileUpload}
  1597. fetchIncoterms={this.fetchIncoterms}
  1598. submit={this.toggleOpen}
  1599. update={this.toggleOpen}
  1600. toggleCloseNumeric={this.toggleCloseNumeric}
  1601. toggleOpenNumeric={this.toggleOpenNumeric}
  1602. toggleClosePengalaman={this.toggleClosePengalaman}
  1603. toggleOpenPengalaman={this.toggleOpenPengalaman}
  1604. toggleCloseTenagaAhli={this.toggleCloseTenagaAhli}
  1605. toggleOpenTenagaAhli={this.toggleOpenTenagaAhli}
  1606. onAddSyaratItemClick={this.onAddSyaratItemClick}
  1607. onEditSyaratItemClick={this.onEditSyaratItemClick}
  1608. onDeleteSyaratItemClick={this.onDeleteSyaratItemClick}
  1609. />
  1610. <Modal isOpen={this.state.modalOpen} toggle={() => this.toggleClose()} className="modal-lg">
  1611. <ModalHeader toggle={() => this.toggleClose()}>Persyaratan {this.state.modalType} </ModalHeader>
  1612. {this.state.loadings.modal && (
  1613. <center>
  1614. <br />
  1615. <ReactLoading type="cylon" color="#0f9e3e" />
  1616. <br />
  1617. </center>
  1618. )}
  1619. {this.state.loadings.modal === false && (
  1620. <PaktaIntegritas
  1621. parentState={this.state}
  1622. parentProps={this.props}
  1623. toggleClose={this.toggleClose}
  1624. submit={this.toggleSubmit}
  1625. update={this.toggleUpdate}
  1626. />
  1627. )}
  1628. </Modal>
  1629. {/* MODAL ASPEK */}
  1630. <Modal isOpen={this.state.modalOpenNumeric} toggle={() => this.toggleCloseNumeric()} className="modal-lg">
  1631. <ModalHeader toggle={() => this.toggleCloseNumeric()}>Input Data Numeric </ModalHeader>
  1632. {this.state.loadings.modal && (<center><br /><ReactLoading type="cylon" color="#0f9e3e" /><br /></center>)}
  1633. {this.state.loadings.modal === false && (
  1634. <Numeric
  1635. parentState={this.state}
  1636. parentProps={this.props}
  1637. submitScoring={this.submitScoring}
  1638. getScoring={this.getScoring}
  1639. toggleClose={this.toggleCloseNumeric}
  1640. submitAspekTeknis={this.submitAspekTeknis}
  1641. removeAspekTeknis={this.removeAspekTeknis}
  1642. editAspekTeknis={this.editAspekTeknis}
  1643. />
  1644. )}
  1645. </Modal>
  1646. {/* MODAL PENGALAMAN */}
  1647. <Modal isOpen={this.state.modalOpenPengalaman} toggle={() => this.toggleClosePengalaman()} className="modal-xl">
  1648. <ModalHeader toggle={() => this.toggleClosePengalaman()}>Input Data Pengalaman </ModalHeader>
  1649. {this.state.loadings.modal && (<center><br /><ReactLoading type="cylon" color="#0f9e3e" /><br /></center>)}
  1650. {this.state.loadings.modal === false && (
  1651. <Pengalaman
  1652. parentState={this.state}
  1653. parentProps={this.props}
  1654. submitScoring={this.submitScoring}
  1655. getScoring={this.getScoring}
  1656. toggleClose={this.toggleClosePengalaman}
  1657. submitAspekTeknis={this.submitAspekTeknis}
  1658. removeAspekTeknis={this.removeAspekTeknis}
  1659. editAspekTeknis={this.editAspekTeknis}
  1660. />
  1661. )}
  1662. </Modal>
  1663. {/* MODAL TENAGA AHLI */}
  1664. <Modal isOpen={this.state.modalOpenTenagaAhli} toggle={() => this.toggleCloseTenagaAhli()} className="modal-xl">
  1665. <ModalHeader toggle={() => this.toggleCloseTenagaAhli()}>Input Data Tenaga Ahli </ModalHeader>
  1666. {this.state.loadings.modal && (<center><br /><ReactLoading type="cylon" color="#0f9e3e" /><br /></center>)}
  1667. {this.state.loadings.modal === false && (
  1668. <TenagaAhli
  1669. parentState={this.state}
  1670. parentProps={this.props}
  1671. submitScoring={this.submitScoring}
  1672. getScoring={this.getScoring}
  1673. toggleClose={this.toggleCloseTenagaAhli}
  1674. submitAspekTeknis={this.submitAspekTeknis}
  1675. removeAspekTeknis={this.removeAspekTeknis}
  1676. editAspekTeknis={this.editAspekTeknis}
  1677. />
  1678. )}
  1679. </Modal>
  1680.  
  1681. {/* MODAL SYARAT ITEM */}
  1682. <Modal isOpen={this.state.modalOpenSyaratItem} toggle={this.onCloseSyaratItemClick} className="modal-md">
  1683. <ModalHeader toggle={this.onCloseSyaratItemClick}>Input Data Syarat Item </ModalHeader>
  1684. <ModalAspekTeknis
  1685. data={this.state.syarat_item_detail}
  1686. loadings={this.state.loadings}
  1687. onSubmit={this.state.syarat_item_detail?.id ? this.updateSyaratItem : this.saveSyaratItem}
  1688. onClose={this.onCloseSyaratItemClick}
  1689. />
  1690. </Modal>
  1691.  
  1692. {this.state.swal.show && (
  1693. <SweetAlert
  1694. warning
  1695. showCancel
  1696. confirmBtnText={t("common:delete.approve-delete")}
  1697. cancelBtnText={t("common:delete.cancel")}
  1698. confirmBtnBsStyle="danger"
  1699. cancelBtnBsStyle="default"
  1700. title={t("common:delete.title-delete")}
  1701. onConfirm={() => this.onSwalConfirm()}
  1702. onCancel={() => this.onSwalCancel()}
  1703. ></SweetAlert>
  1704. )}
  1705. </div>
  1706. );
  1707. }
  1708. }
  1709.  
  1710. const stateToProps = state => {
  1711. return {
  1712. sidebarDt: state.sidebarDt,
  1713. access: state.sidebarDt.access,
  1714. user: state.auth.user.data,
  1715. temporary: state.temporary
  1716. }
  1717. }
  1718.  
  1719. const dispatchToProps = dispatch => {
  1720. return {
  1721. fetchIncoterms: (params) => dispatch(fetchIncoterms(params)),
  1722. fileUpload: (id, payload) => dispatch(fileUpload(id, payload)),
  1723. getProposalTender: (uuid, params) => dispatch(getProposalTender(uuid, params)),
  1724. getVendorQuotation: (uuid, params) => dispatch(getVendorQuotation(uuid, params)),
  1725. submitVendorQuotation: (uuid, params) => dispatch(submitVendorQuotation(uuid, params)),
  1726. updateVendorQuotation: (uuid, params) => dispatch(updateVendorQuotation(uuid, params)),
  1727. fetchPurchasingOrg: (params) => dispatch(fetchPurchasingOrg(params)),
  1728. submitScoring: (uuid, params) => dispatch(submitScoring(uuid, params)),
  1729. getScoring: (uuid, params) => dispatch(getScoring(uuid, params)),
  1730.  
  1731. fetchProposalTenderSyaratItem: (params) => dispatch(fetchProposalTenderSyaratItem(params)),
  1732. showProposalTenderSyaratItem: (uuid) => dispatch(showProposalTenderSyaratItem(uuid)),
  1733. deleteProposalTenderSyaratItem: (uuid) => dispatch(deleteProposalTenderSyaratItem(uuid)),
  1734. saveProposalTenderSyaratItem: (params) => dispatch(saveProposalTenderSyaratItem(params)),
  1735. updateProposalTenderSyaratItem: (uuid, params) => dispatch(updateProposalTenderSyaratItem(uuid, params)),
  1736. }
  1737. }
  1738.  
  1739. export default connect(stateToProps, dispatchToProps)( withTranslation() (QuotationDetail));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement