@provis/provis-common-be-module 2.6.64 → 2.6.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ICCB-INV-IMPACT-ANALYSIS.md +177 -0
- package/dist/class/main.repository.js +4 -4
- package/dist/constants/claim/general.js +1 -1
- package/dist/constants/claim/kalog.js +1 -1
- package/dist/constants/claim/loket.js +40 -40
- package/dist/constants/claim/motorVehicle.js +1 -1
- package/dist/constants/claim/travel.js +1 -1
- package/dist/constants/config.js +2 -2
- package/dist/constants/product/cargo/cargo.d.ts +7 -0
- package/dist/constants/product/cargo/cargo.js +7 -0
- package/dist/constants/product.js +12 -12
- package/dist/constants/source.js +1 -1
- package/dist/helpers/alphaNumericCleansing.js +1 -1
- package/dist/helpers/amountDescription.js +1 -1
- package/dist/helpers/axiosGet.js +1 -1
- package/dist/helpers/axiosPost.js +1 -1
- package/dist/helpers/axiosPut.js +1 -1
- package/dist/helpers/calculateByType.js +1 -1
- package/dist/helpers/calculateForNullable.js +6 -6
- package/dist/helpers/getHeaderUser.js +4 -4
- package/dist/helpers/loop.js +2 -2
- package/dist/helpers/loopBackward.js +2 -2
- package/dist/helpers/readExcel.d.ts +0 -2
- package/package.json +1 -1
- package/dist/constants/bankAccount.d.ts +0 -8
- package/dist/constants/bankAccount.js +0 -54
- package/dist/constants/product/coretax.d.ts +0 -12
- package/dist/constants/product/coretax.js +0 -14
- package/dist/constants/product/mv.d.ts +0 -30
- package/dist/constants/product/mv.js +0 -158
- package/dist/constants/product/property/occupation.d.ts +0 -5
- package/dist/constants/product/property/occupation.js +0 -1725
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Impact Analysis: Adding `ICCB-INV` Insurance Type (Institute Cargo Clause B)
|
|
2
|
+
|
|
3
|
+
> Analisis dampak penambahan tipe asuransi baru `ICCB-INV` (Institute Cargo Clause B) ke seluruh ekosistem Provi/Polismall.
|
|
4
|
+
>
|
|
5
|
+
> Tanggal analisis: 2026-07-17
|
|
6
|
+
|
|
7
|
+
## Ringkasan Eksekutif
|
|
8
|
+
|
|
9
|
+
Saat ini sistem hanya mendukung 4 tipe clause: `ICCA-INV`, `ICCC-INV`, `ICCA-FLB`, `ICCC-FLB` (Clause A dan C). Penambahan `ICCB-INV` berdampak ke banyak project karena **logika clause diduplikasi secara lokal** di tiap konsumen (bukan memakai satu sumber tunggal).
|
|
10
|
+
|
|
11
|
+
Temuan penting:
|
|
12
|
+
|
|
13
|
+
- `ICCB-INV` **sudah ada** di shared library `provis-common-be-module` (TYPE map), tetapi **belum ada** di sebagian besar konsumen yang punya konstanta/switch lokal sendiri.
|
|
14
|
+
- **Tidak ada satu pun validasi DTO (`IsEnum`/`IsIn`)** di semua backend. Artinya `ICCB-INV` akan lolos diam-diam tanpa error, dan bug hanya muncul sebagai **data kosong/salah** di output (sertifikat, PDF, premi), bukan sebagai error yang mudah terdeteksi.
|
|
15
|
+
- Terdapat **dua vocabulary clause yang berbeda** di codebase: format `ICCA-INV` (exim/dashboard/common-module) vs format `ICC A` (provis-invoice, provis-meratus-api). Tidak ada single source of truth.
|
|
16
|
+
|
|
17
|
+
Dua hal yang harus dikonfirmasi sebelum implementasi:
|
|
18
|
+
|
|
19
|
+
1. **Nilai rate ICCB** — dipakai di perhitungan premi (`pdf.ts`, `provis-invoice`, `provis-meratus-api`). Tidak bisa ditebak.
|
|
20
|
+
2. **Apakah butuh varian `ICCB-FLB`** juga, atau cukup `ICCB-INV`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Project yang WAJIB Diubah (ada logika clause)
|
|
25
|
+
|
|
26
|
+
### 1. provis-common-be-module (shared, source of truth)
|
|
27
|
+
|
|
28
|
+
| File | Lokasi | Keterangan |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `src/constants/product/cargo/cargo.ts` | TYPE map | `ICCB-INV` **sudah ada**. Namun **belum ada `ICCB-FLB`** → gap kalau butuh varian First Loss Basis. |
|
|
31
|
+
| `src/helpers/getCargoType.ts:3` | `getCargoType()` | Data-driven (lookup by code di TYPE map), otomatis resolve. Tidak perlu ubah kode. |
|
|
32
|
+
|
|
33
|
+
### 2. polismall-exim-api
|
|
34
|
+
|
|
35
|
+
| File | Lokasi | Keterangan |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `src/common/constants/cargo.ts` | `CARGO_TYPE_ICC_*` | Hanya A & C, wajib tambah konstanta ICCB. |
|
|
38
|
+
| `src/common/constants/pdf.ts:7` | `RATE_RULES` | **KRITIS** — wajib tambah rate `ICCB` untuk perhitungan premi. `getRate()` ambil prefix `code.split('-')[0]`; tanpa entry `ICCB` akan return `null`. |
|
|
39
|
+
| `src/service/booking.service.ts:1305` | `convertInsuranceTypeDesc` | Tambah case ICCB. |
|
|
40
|
+
| `src/service/declarationBundle.service.ts:387` | `convertInsuranceTypeDesc` | Tambah case ICCB. |
|
|
41
|
+
| `src/service/internal.declaration.service.ts:1516` | `convertInsuranceType` | Matching by text "Institute Cargo Clause (A/C)". |
|
|
42
|
+
| `src/service/internal.declaration.service.ts:1527` | `convertInsuranceTypeNamingConv` | Tambah case ICCB. |
|
|
43
|
+
| `src/service/internal.declaration.service.ts:1541` | `convertInsuranceTypeDesc` | ⚠️ **Tanpa `default`** → return `undefined` untuk tipe tak dikenal. |
|
|
44
|
+
| `src/service/internal.declaration.service.ts:2587` | `convertIdCoverage` | Tambah case ICCB. |
|
|
45
|
+
| `src/service/internal.declaration.service.ts:2602` | `convertInsuranceTypeNamingConvReverse` | Tambah case ICCB. |
|
|
46
|
+
| `src/service/retry.service.ts:112` | `convertInsuranceTypeNamingConv` | Duplikat, default return `''`. |
|
|
47
|
+
|
|
48
|
+
### 3. provis-invoice (KRITIS — rate hardcode)
|
|
49
|
+
|
|
50
|
+
| File | Lokasi | Keterangan |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `src/service/cargoMeratus.service.ts:298` | `checkInsuranceType()` | Tanpa case ICC B akan masuk `default` → **throw error** di `:384`/`:447`. |
|
|
53
|
+
| `src/service/cargoMeratus.service.ts:302,309,325,341` | description strings | Butuh string clause B sendiri. |
|
|
54
|
+
| `src/service/cargoMeratus.service.ts:504` | render conditions | Mengalir dari string di atas. |
|
|
55
|
+
| `src/common/constants/cargoMeratus.ts:34-37` | konstanta `ICC A`/`ICC C`/`FLB A`/`FLB C` | Tambah `ICC B`. ⚠️ Pakai vocabulary beda (`ICC A`, bukan `ICCA-INV`). |
|
|
56
|
+
|
|
57
|
+
### 4. provis-meratus-api (core mapping)
|
|
58
|
+
|
|
59
|
+
| File | Lokasi | Keterangan |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `src/common/constants/config.ts:35-38` | konstanta clause | Tambah `ICC B`/`FLB B`. |
|
|
62
|
+
| `src/service/meratus.service.ts:681-692` | `getInsuranceTypeDesc()` | Tambah case Clause B. |
|
|
63
|
+
| `src/service/meratus.service.ts:702-711` | `getInsuranceGoodType()` | Butuh keputusan good type untuk Clause B. |
|
|
64
|
+
| `src/service/meratus.service.ts:721-732` | `getInsuranceTypeCode()` | Tambah case `ICCB-INV`/`ICCB-FLB`. |
|
|
65
|
+
|
|
66
|
+
### 5. polismall-dashboard-api
|
|
67
|
+
|
|
68
|
+
> Catatan: saat ini bahkan **hanya ICCA** yang ter-wire (belum ada ICCC).
|
|
69
|
+
|
|
70
|
+
| File | Lokasi | Keterangan |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| `src/common/constants/excelRead.ts:13-14` | `TYPE_ICCA_INV`, `TYPE_ICCA_FLB` | Tambah entry ICCB. |
|
|
73
|
+
| `src/controller/excelRead.controller.ts:165-172` | dropdown `insuranceTypes` | Dibangun via `getCargoType()`. |
|
|
74
|
+
| `src/service/excelRead.service.ts:228,305,324,346-352` | sumInsured / `detectInsuranceType()` | Logika keyed pada `TYPE_ICCA_INV.code`. |
|
|
75
|
+
|
|
76
|
+
### 6. provis-back-office
|
|
77
|
+
|
|
78
|
+
| File | Lokasi | Keterangan |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `src/service/excel.service.ts:221-227` | switch clause | ⚠️ line 227 kemungkinan bug: `ICCC-INV` di posisi label `ICCA-FLB`. |
|
|
81
|
+
| `src/common/constants/excelUpload.ts:74` | header "RISK COVER" | Enumerasi kode yang diperbolehkan. |
|
|
82
|
+
| `src/common/constants/excelUploadBundleCargo.ts:84` | header "RISK COVER" | Enumerasi kode yang diperbolehkan. |
|
|
83
|
+
|
|
84
|
+
### 7. bolier-plate-go-rest
|
|
85
|
+
|
|
86
|
+
| File | Lokasi | Keterangan |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| `app/constants/ppnp_constants.go:5-8` | konstanta clause Go + contoh rate | Tambah konstanta ICCB. |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Frontend / Microsite (dropdown & label)
|
|
93
|
+
|
|
94
|
+
### 8. temas-microsite
|
|
95
|
+
|
|
96
|
+
| File | Lokasi | Keterangan |
|
|
97
|
+
|---|---|---|
|
|
98
|
+
| `views/index.ejs:259-262` | dropdown user | Satu-satunya tempat user memilih clause. Tambah `<option value="ICCB-INV">`. |
|
|
99
|
+
| `src/service/micrositeService.ts:782-788` | switch mapping | Tambah case ICCB-INV. |
|
|
100
|
+
| `public/js/function-detail.js:294-315` | rate switch + cap sum insured | Tambah case ICCB-INV. |
|
|
101
|
+
| `public/js/function-index.js:374-395` | rate switch (mirror) | Tambah case ICCB-INV. |
|
|
102
|
+
| `public/js/function-index.js:284-285` | option-hide logic | Review apakah ICCB perlu di-hide kondisional. |
|
|
103
|
+
| `public/js/common/upload.js:18-198` | bulk-upload code mapping | ⚠️ Juga referensi `ICCA-SEC`, `ICCC-NEW`, `ICCC-SEC` → universe clause ternyata lebih luas. |
|
|
104
|
+
| `locales/id.json:25,28`, `locales/en.json:26,29` | teks i18n | Update copy untuk menyebut Clause B. |
|
|
105
|
+
|
|
106
|
+
### 9. polismall-exim-microsite
|
|
107
|
+
|
|
108
|
+
| File | Lokasi | Keterangan |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `src/constants/index.js:22` | `INSURANCE_TYPES` array | `["ICCA-INV","ICCC-INV","ICCA-FLB","ICCC-FLB"]` → tambah `ICCB-INV`. |
|
|
111
|
+
| `src/components/Detail/Detail.js:144` | label hardcode | Teks statis "Institute Cargo Clause (A)...", perlu varian B / dinamis. |
|
|
112
|
+
| `src/pages/Booking/BookingNext.js:266` | default fallback | Review default value. |
|
|
113
|
+
|
|
114
|
+
### 10. polismall-dashboard-web
|
|
115
|
+
|
|
116
|
+
| File | Lokasi | Keterangan |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| `src/constants/index.js:38-47` | `INSURANCE_TYPE_YUDHA_OPTIONS` | Hanya ICCA-INV & ICCA-FLB. Tambah opsi ICCB. |
|
|
119
|
+
| `src/pages/Tanto/UploadTransaction/index.js:91` | `orderedCodes` | `["ICCA-INV","ICCC-INV","ICCA-FLB","ICCC-FLB"]` → tambah ICCB. |
|
|
120
|
+
|
|
121
|
+
### 11. provis-internal-web
|
|
122
|
+
|
|
123
|
+
| File | Lokasi | Keterangan |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| `src/components/FileUpload/FileUpload.js:610-621` | dropdown MenuItem | Tambah item ICCB. |
|
|
126
|
+
| `src/pages/Upload/Gemilang/Component/CreateData.js:205-215` | dropdown MenuItem | Tambah item ICCB. |
|
|
127
|
+
| `src/pages/Upload/Gemilang/Component/DataTableExcel.js:514-524` | dropdown MenuItem | Tambah item ICCB. |
|
|
128
|
+
| `src/components/Forms/UpdateForm.js:349-366` | switch label | Dead code (commented out). Tidak perlu aksi kecuali diaktifkan. |
|
|
129
|
+
|
|
130
|
+
### 12. provis-internal-web-v2
|
|
131
|
+
|
|
132
|
+
| File | Lokasi | Keterangan |
|
|
133
|
+
|---|---|---|
|
|
134
|
+
| `src/lib/constants.js:71-76` | `CARGO_TYPE` | Copy dari shared module. Tambah `TYPE_ICCB_INV`. |
|
|
135
|
+
| `src/lib/constants.js:81-85` | `cargoTypeLabel()` | Iterasi `CARGO_TYPE`, auto-resolve entry baru. |
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Project TANPA Impact (pass-through / DB-driven)
|
|
140
|
+
|
|
141
|
+
| Project | Alasan |
|
|
142
|
+
|---|---|
|
|
143
|
+
| **marine-cargo** | DB-driven via tabel `rate_group`. Cukup tambah record DB, **tidak ada perubahan kode**. |
|
|
144
|
+
| **marine-cargo..** | Sama seperti marine-cargo (DB-driven). |
|
|
145
|
+
| **provis-generate-pdf** | Hanya render string `insuranceType`/`insuranceTypeDesc` yang diterima. Switch keyed pada `productType`/`productCode`, bukan clause. |
|
|
146
|
+
| **provis-generate-excel** | Tidak ada referensi clause sama sekali. |
|
|
147
|
+
| **provis-claim-api** | `insuranceType`/`insuranceTypeName` hanya pass-through string. |
|
|
148
|
+
| **provis-payment** | Tidak ada referensi clause. |
|
|
149
|
+
| **polismall-cargo-container-api** | `insuranceType` pass-through, tidak pernah diinspeksi. |
|
|
150
|
+
| **polismall-cargo-claim-microsite** | Tidak ada referensi clause. |
|
|
151
|
+
| **polismall-otto-api** | Keyed pada `productCode`, bukan clause. |
|
|
152
|
+
| **polismall-kca-api** | `insuranceType` plain string, no clause logic. |
|
|
153
|
+
| **polismall-invoice-microsite** | Tidak ada logika clause (match hanya false positive). |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Matriks Prioritas
|
|
158
|
+
|
|
159
|
+
| Prioritas | Project | Alasan |
|
|
160
|
+
|---|---|---|
|
|
161
|
+
| **KRITIS** | provis-invoice | `default` case → throw error, premi gagal |
|
|
162
|
+
| **KRITIS** | polismall-exim-api | rate `RATE_RULES` + 6 fungsi konversi |
|
|
163
|
+
| **KRITIS** | provis-meratus-api | 3 switch core mapping |
|
|
164
|
+
| **TINGGI** | dashboard-api, back-office | rate/excel logic |
|
|
165
|
+
| **SEDANG** | temas-microsite, exim-microsite, dashboard-web, internal-web, internal-web-v2 | dropdown + label |
|
|
166
|
+
| **RENDAH** | provis-common-be-module | `ICCB-INV` sudah ada, cek perlu `ICCB-FLB` |
|
|
167
|
+
| **NONE** | marine-cargo (DB), generators, pass-through services | tinggal data DB |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Catatan Risiko
|
|
172
|
+
|
|
173
|
+
1. **Silent failure**: Tanpa validasi DTO, input `ICCB-INV` tidak ditolak. Field turunan (deskripsi, premi) akan `undefined`/`null`/kosong tanpa error.
|
|
174
|
+
2. **Duplikasi logika**: `convertInsuranceTypeDesc` ada di 3 service dengan behavior default berbeda (return value asli / `''` / `undefined`). Harus disinkronkan.
|
|
175
|
+
3. **Dua vocabulary**: `ICCA-INV` vs `ICC A`. Update di satu format tidak otomatis memperbaiki format lain.
|
|
176
|
+
4. **Universe clause lebih luas dari perkiraan**: `temas-microsite/upload.js` menyebut `ICCA-SEC`, `ICCC-NEW`, `ICCC-SEC`. Konfirmasi daftar clause otoritatif lengkap sebelum implementasi.
|
|
177
|
+
5. **Rate ICCB belum diketahui**: harus dikonfirmasi dari tim bisnis/aktuaria.
|
|
@@ -116,8 +116,8 @@ class MainRepository extends typeorm_1.Repository {
|
|
|
116
116
|
return result;
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
summaryField(
|
|
120
|
-
return __awaiter(this,
|
|
119
|
+
summaryField(_a) {
|
|
120
|
+
return __awaiter(this, arguments, void 0, function* ({ fieldToSum, search, additionalSearchOr, relations, subqueryIns, }) {
|
|
121
121
|
let query = this.createQueryBuilder()
|
|
122
122
|
.select([
|
|
123
123
|
'COUNT(1) AS totalRows',
|
|
@@ -133,8 +133,8 @@ class MainRepository extends typeorm_1.Repository {
|
|
|
133
133
|
return query.getRawOne();
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
findAllAndCount(
|
|
137
|
-
return __awaiter(this,
|
|
136
|
+
findAllAndCount(_a) {
|
|
137
|
+
return __awaiter(this, arguments, void 0, function* ({ search, additionalSearchOr, relations, subqueryIns, sortBy, offset = 1, maxCount = 50, }) {
|
|
138
138
|
const skipItems = ((offset < 1 ? 1 : offset) - 1) * maxCount;
|
|
139
139
|
let query = this.createQueryBuilder().select(this.selectFieldOnFindAllAndCount());
|
|
140
140
|
query = this.applySearchConditions({
|
|
@@ -4,51 +4,51 @@ const status_1 = require("./status");
|
|
|
4
4
|
const config_1 = require("../config");
|
|
5
5
|
const loket = {
|
|
6
6
|
// LIST RESIKO
|
|
7
|
-
RISK_CLK001: 'CLK001',
|
|
8
|
-
RISK_CLK007: 'CLK007',
|
|
9
|
-
RISK_CLK002: 'CLK002',
|
|
10
|
-
RISK_CLK003: 'CLK003',
|
|
11
|
-
RISK_CLK004: 'CLK004',
|
|
12
|
-
RISK_CLK008: 'CLK008',
|
|
13
|
-
RISK_CLK006: 'CLK006',
|
|
14
|
-
RISK_CLK009: 'CLK009',
|
|
7
|
+
RISK_CLK001: 'CLK001', //Meninggal Dunia akibat kecelakaan
|
|
8
|
+
RISK_CLK007: 'CLK007', //Cacat Tetap akibat kecelakaan
|
|
9
|
+
RISK_CLK002: 'CLK002', //Biaya pengobatan akibat kecelakaan
|
|
10
|
+
RISK_CLK003: 'CLK003', //Kerusakan barang pribadi
|
|
11
|
+
RISK_CLK004: 'CLK004', //Pembatalan Konser dibatalkan oleh Penyelenggara Acara
|
|
12
|
+
RISK_CLK008: 'CLK008', //Pembatalan oleh Tertanggung yang mengakibatkan tidak dapat menghadiri acara karena:
|
|
13
|
+
RISK_CLK006: 'CLK006', //Santunan Kebakaran termasuk adanya perampokan dan pencurian dengan kekerasan dan dibuktikan adanya pengrusakan atas Rumah Tinggal
|
|
14
|
+
RISK_CLK009: 'CLK009', //Santunan Penggantian Akomodasi dan Transportasi
|
|
15
15
|
// INI dropdown buat CLK008
|
|
16
|
-
RISK_CLK010: 'CLK010',
|
|
17
|
-
RISK_CLK005: 'CLK005',
|
|
18
|
-
RISK_CLK011: 'CLK011',
|
|
19
|
-
RISK_CLK012: 'CLK012',
|
|
20
|
-
RISK_CLK013: 'CLK013',
|
|
21
|
-
RISK_CLK014: 'CLK014',
|
|
16
|
+
RISK_CLK010: 'CLK010', //Cedera atau Penyakit serius atau meninggal dunia yang dialami Tertanggung atau keluarga inti*
|
|
17
|
+
RISK_CLK005: 'CLK005', //Sakit Rawat Inap di Rumah Sakit minimal 2 (dua) hari
|
|
18
|
+
RISK_CLK011: 'CLK011', //Panggilan untuk menjadi saksi pengadilan, yang tidak diberitahukan lebih dahulu kepada anda sebelum anda mengambil Polis ini
|
|
19
|
+
RISK_CLK012: 'CLK012', //Terjadinya pemogokan, kerusuhan atau huru-hara yang tidak terduga dimana keadaan tersebut terjadi di tempat tujuan (lokasi acara) yang direncanakan diluar kendali anda
|
|
20
|
+
RISK_CLK013: 'CLK013', //Tempat tinggal anda atau Tempat usaha anda di Indonesia mengalami kerusakan besar** karena kebakaran, banjir atau bencana alam sejenis dan kehadiran anda diperlukan pada tempatnya saat atau setelah tanggal keberangkatan
|
|
21
|
+
RISK_CLK014: 'CLK014', //Pesawat delay minimal 4 jam dan/atau penerbangan pesawat dibatalkan karena bencana alam, akibat pemogokan, aksi buruh sektor industri, cuaca buruk, kerusakan mekanis atau penutupan bandara atau pelabuhan keberangkatan
|
|
22
22
|
// LIST DOCUMENT
|
|
23
|
-
DOCUMENT_DLK001: 'DLK001',
|
|
24
|
-
DOCUMENT_DLK002: 'DLK002',
|
|
25
|
-
DOCUMENT_DLK003: 'DLK003',
|
|
26
|
-
DOCUMENT_DLK004: 'DLK004',
|
|
27
|
-
DOCUMENT_DLK005: 'DLK005',
|
|
28
|
-
DOCUMENT_DLK006: 'DLK006',
|
|
29
|
-
DOCUMENT_DLK007: 'DLK007',
|
|
30
|
-
DOCUMENT_DLK008: 'DLK008',
|
|
31
|
-
DOCUMENT_DLK009: 'DLK009',
|
|
32
|
-
DOCUMENT_DLK010: 'DLK010',
|
|
33
|
-
DOCUMENT_DLK011: 'DLK011',
|
|
34
|
-
DOCUMENT_DLK012: 'DLK012',
|
|
35
|
-
DOCUMENT_DLK013: 'DLK013',
|
|
36
|
-
DOCUMENT_DLK014: 'DLK014',
|
|
37
|
-
DOCUMENT_DLK015: 'DLK015',
|
|
38
|
-
DOCUMENT_DLK016: 'DLK016',
|
|
39
|
-
DOCUMENT_DLK017: 'DLK017',
|
|
40
|
-
DOCUMENT_DLK018: 'DLK018',
|
|
41
|
-
DOCUMENT_DLK019: 'DLK019',
|
|
42
|
-
DOCUMENT_DLK020: 'DLK020',
|
|
43
|
-
DOCUMENT_DLK021: 'DLK021',
|
|
44
|
-
DOCUMENT_DLK022: 'DLK022',
|
|
45
|
-
DOCUMENT_DLK023: 'DLK023',
|
|
46
|
-
DOCUMENT_DLK024: 'DLK024',
|
|
47
|
-
DOCUMENT_DLK025: 'DLK025',
|
|
23
|
+
DOCUMENT_DLK001: 'DLK001', // KTP
|
|
24
|
+
DOCUMENT_DLK002: 'DLK002', // Tiket Konser
|
|
25
|
+
DOCUMENT_DLK003: 'DLK003', // Bukti pemesanan tiket
|
|
26
|
+
DOCUMENT_DLK004: 'DLK004', // Surat Keterangan Kematian dari Aparat Setempat
|
|
27
|
+
DOCUMENT_DLK005: 'DLK005', // Surat Kecelakaan dan Penghentian Pencarian dari Pihak Berwenang
|
|
28
|
+
DOCUMENT_DLK006: 'DLK006', // Akta Kematian jika Tertanggung Meninggal Dunia atau Surat Pemeriksaan
|
|
29
|
+
DOCUMENT_DLK007: 'DLK007', // (Visum) dari Dokter jika Tertanggung Cacat Tetap
|
|
30
|
+
DOCUMENT_DLK008: 'DLK008', // Nota-nota dan kwitansi asli biaya pengobatan
|
|
31
|
+
DOCUMENT_DLK009: 'DLK009', // Catatan diagnosis dokter / laporan medis asli termasuk informasi lama perawatan rumah sakit
|
|
32
|
+
DOCUMENT_DLK010: 'DLK010', // Bukti kerusakan / Foto-foto (jika pencurian dengan kekerasan atau kerusakan)
|
|
33
|
+
DOCUMENT_DLK011: 'DLK011', // Surat laporan polisi (khusus kehilangan)
|
|
34
|
+
DOCUMENT_DLK012: 'DLK012', // Estimasi biaya perbaikan (jika kerusakan)
|
|
35
|
+
DOCUMENT_DLK013: 'DLK013', // Bukti kepemilikan barang (invoice / kwitansi pembelian)
|
|
36
|
+
DOCUMENT_DLK014: 'DLK014', // Dokumen bukti pengembalian/refund dari Loket.com sehubungan dengan pembatalan
|
|
37
|
+
DOCUMENT_DLK015: 'DLK015', // Surat Pernyataan dari pihak Loket.com yang menjelaskan penyebab pembatalan tiket
|
|
38
|
+
DOCUMENT_DLK016: 'DLK016', // Laporan polisi yang menjelaskan kejadian
|
|
39
|
+
DOCUMENT_DLK017: 'DLK017', // Daftar barang yang terbakar/rusak beserta jenis dan spesifikasinya
|
|
40
|
+
DOCUMENT_DLK018: 'DLK018', // Apabila alamat rumah tinggal tidak sama dengan KTP maka perlu dibuktikan dengan surat keterangan tinggal sementara dari RT/RW setempat atau pihak Kelurahan
|
|
41
|
+
DOCUMENT_DLK019: 'DLK019', // Bukti Ahli Waris dari Penerima Manfaat (KTP dan KK) atau Surat dari Pengadilan
|
|
42
|
+
DOCUMENT_DLK020: 'DLK020', // Bukti Pembayaran Akomodasi dan Transportasi – Invoice, kwitansi hotel, bukti reservasi, tiket transportasi yang terjadwal (misalnya kereta, pesawat)
|
|
43
|
+
DOCUMENT_DLK021: 'DLK021', // Surat panggilan pengadilan (jika batal akibat menjadi saksi)
|
|
44
|
+
DOCUMENT_DLK022: 'DLK022', // Surat keterangan dari penyelenggara acara, kepolisian, pemerintah setempat, dan/atau media yang menyatakan bahwa terjadi pemogokan, kerusuhan, atau huru-hara di lokasi acara
|
|
45
|
+
DOCUMENT_DLK023: 'DLK023', // Surat keterangan RT/RW dan foto-foto pendukung (jika tempat tinggal atau tempat usaha rusak)
|
|
46
|
+
DOCUMENT_DLK024: 'DLK024', // Surat keterangan dari Maskapai Penerbangan (jika penerbangan delay atau dibatalkan)
|
|
47
|
+
DOCUMENT_DLK025: 'DLK025', // Bukti pembayaran tiket
|
|
48
48
|
DOCUMENT_DT001: 'DT001',
|
|
49
49
|
DOCUMENT_DT002: 'DT002',
|
|
50
50
|
DOCUMENT_DT003: 'DT003',
|
|
51
|
-
LIST_RISK: [],
|
|
51
|
+
LIST_RISK: [], // untuk ambil list dari resiko
|
|
52
52
|
RISK_CONFIG: {},
|
|
53
53
|
DOCUMENT_CONFIG: {},
|
|
54
54
|
STATUS_DEADLINE: {},
|
|
@@ -33,7 +33,7 @@ const motorVehicle = {
|
|
|
33
33
|
VCDOC022: { key: 'VCDOC022', descEn: '', desc: 'Kuitansi dari Rumah Sakit' },
|
|
34
34
|
VCDOC023: { key: 'VCDOC023', descEn: '', desc: 'Sertifikat Kematian - Untuk kematian Pihak Ketiga' },
|
|
35
35
|
VCDOC024: { key: 'VCDOC024', descEn: '', desc: 'Seluruh korespondensi dengan pihak ketiga yang mengalami luka/kematian' },
|
|
36
|
-
LIST_RISK: [],
|
|
36
|
+
LIST_RISK: [], // untuk ambil list dari resiko
|
|
37
37
|
RISK_CONFIG: {},
|
|
38
38
|
DOCUMENT_CONFIG: {},
|
|
39
39
|
STATUS_DEADLINE: {},
|
|
@@ -73,7 +73,7 @@ const travel = {
|
|
|
73
73
|
TCDOC044: { key: 'TCDOC044', descEn: '', desc: 'Tanda terima bagasi (berisi jam & tanggal bagasi diterima)' },
|
|
74
74
|
TCDOC045: { key: 'TCDOC045', descEn: '', desc: 'Ticket & Boarding Pass' },
|
|
75
75
|
TCDOC046: { key: 'TCDOC046', descEn: '', desc: 'Visum et Repertum' },
|
|
76
|
-
LIST_RISK: [],
|
|
76
|
+
LIST_RISK: [], // untuk ambil list dari resiko
|
|
77
77
|
RISK_CONFIG: {},
|
|
78
78
|
DOCUMENT_CONFIG: {},
|
|
79
79
|
STATUS_DEADLINE: {},
|
package/dist/constants/config.js
CHANGED
|
@@ -11,8 +11,8 @@ const config = {
|
|
|
11
11
|
date_simple_format_withoud_dash: 'YYYYMMDD',
|
|
12
12
|
date_format_full_datetime_only: 'DD/MM/YYYY HH:ii:ss',
|
|
13
13
|
date_format_timestamp: 'timestamp',
|
|
14
|
-
date_format_indonesia_format: 'D M Y',
|
|
15
|
-
date_format_english_format: 'DD MMM YYYY',
|
|
14
|
+
date_format_indonesia_format: 'D M Y', /** example: 16 Mei 2020 */
|
|
15
|
+
date_format_english_format: 'DD MMM YYYY', /** example: 16 May 2020 */
|
|
16
16
|
date_simple_indonesia_format: 'DD-MM-YYYY',
|
|
17
17
|
// GENDER
|
|
18
18
|
GENDER_MALE: 'M',
|
|
@@ -18,6 +18,13 @@ const cargo = {
|
|
|
18
18
|
en: 'Institute Cargo Clause (A) 01/01/09 - Invoice value +10%',
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
+
TYPE_ICCB_INV: {
|
|
22
|
+
code: 'ICCB-INV',
|
|
23
|
+
desc: {
|
|
24
|
+
id: 'Institute Cargo Clause (B) 01/01/09 - Invoice value +10%',
|
|
25
|
+
en: 'Institute Cargo Clause (B) 01/01/09 - Invoice value +10%',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
21
28
|
TYPE_ICCC_INV: {
|
|
22
29
|
code: 'ICCC-INV',
|
|
23
30
|
desc: {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const occupation_simple_1 = require("./product/property/occupation-simple");
|
|
4
4
|
const product = {
|
|
5
|
-
LIST: {},
|
|
6
|
-
MANUAL_LIST: [],
|
|
5
|
+
LIST: {}, // ini buat semua product
|
|
6
|
+
MANUAL_LIST: [], // ini buat product yang bisa diadd manual -> di form quotation / policy
|
|
7
7
|
CARGO_BY_SYSTEM_LIST: [],
|
|
8
8
|
PRODUCT_CODE_PROPERTY_ALL_RISK: 'polismall-property-allrisk',
|
|
9
9
|
PRODUCT_CODE_EARTHQUAKE: 'polismall-earthquake',
|
|
@@ -53,17 +53,17 @@ const product = {
|
|
|
53
53
|
PRODUCT_CODE_CARGO_BUNDLE: 'polismall-cargo-bundle',
|
|
54
54
|
PRODUCT_CODE_MERIMEN_CARGO: 'polismall-merimen-cargo',
|
|
55
55
|
PRODUCT_CODE_CARGO_TEMAS: 'polismall-cargo-temas',
|
|
56
|
-
PRODUCT_CODE_CARGO_SINGLE_SHIPMENT: 'polismall-cargo-single-shipment',
|
|
56
|
+
PRODUCT_CODE_CARGO_SINGLE_SHIPMENT: 'polismall-cargo-single-shipment', // Marine Cargo Single Shipment, buat add manual di policy
|
|
57
57
|
// OTTO
|
|
58
|
-
PRODUCT_CODE_OTTO_CI: 'polismall-otto-critical-illness',
|
|
59
|
-
PRODUCT_CODE_OTTO_FLEXAS: 'polismall-otto-flexas',
|
|
60
|
-
PRODUCT_CODE_OTTO_CRACK_SCREEN: 'polismall-otto-crack',
|
|
61
|
-
PRODUCT_CODE_OTTO_AUM_GP: 'polismall-otto-aum-gp',
|
|
62
|
-
PRODUCT_CODE_OTTO_AUM_PLN: 'polismall-otto-aum-pln',
|
|
63
|
-
PRODUCT_CODE_OTTO_AUM_PDAM: 'polismall-otto-aum-pdam',
|
|
64
|
-
PRODUCT_CODE_OTTO_AUM_SB: 'polismall-otto-aum-sb',
|
|
65
|
-
PRODUCT_CODE_OTTO_AUM_FB: 'polismall-otto-aum-fb',
|
|
66
|
-
PRODUCT_CODE_OTTO_AUM_FBK: 'polismall-otto-aum-fbk',
|
|
58
|
+
PRODUCT_CODE_OTTO_CI: 'polismall-otto-critical-illness', // ELI
|
|
59
|
+
PRODUCT_CODE_OTTO_FLEXAS: 'polismall-otto-flexas', // MNC
|
|
60
|
+
PRODUCT_CODE_OTTO_CRACK_SCREEN: 'polismall-otto-crack', // MNC
|
|
61
|
+
PRODUCT_CODE_OTTO_AUM_GP: 'polismall-otto-aum-gp', // AUM Gamers Protection
|
|
62
|
+
PRODUCT_CODE_OTTO_AUM_PLN: 'polismall-otto-aum-pln', // AUM Biller Protection PLN
|
|
63
|
+
PRODUCT_CODE_OTTO_AUM_PDAM: 'polismall-otto-aum-pdam', // AUM Biller Protection PDAM
|
|
64
|
+
PRODUCT_CODE_OTTO_AUM_SB: 'polismall-otto-aum-sb', // AUM Merchant Protection Stock Barang
|
|
65
|
+
PRODUCT_CODE_OTTO_AUM_FB: 'polismall-otto-aum-fb', // AUM Merchant Protection FLEXAS+BANJIR
|
|
66
|
+
PRODUCT_CODE_OTTO_AUM_FBK: 'polismall-otto-aum-fbk', // AUM Merchant Protection FLEXAS+BANJIR+KEBONGKARAN
|
|
67
67
|
// BDKI
|
|
68
68
|
PRODUCT_CODE_BDKI_MOTOR: 'polismall-bdki-motor',
|
|
69
69
|
PRODUCT_CODE_BDKI_RUMAH: 'polismall-bdki-rumah',
|
package/dist/constants/source.js
CHANGED
|
@@ -6,7 +6,7 @@ const source = {
|
|
|
6
6
|
SOURCE_TANTO: 'TANTO',
|
|
7
7
|
SOURCE_MERATUS_PALISIDE: 'MERATUS-PALISIDE',
|
|
8
8
|
SOURCE_TEMAS: 'TEMAS',
|
|
9
|
-
SOURCE_DOMESTIK: 'DOMESTIK',
|
|
9
|
+
SOURCE_DOMESTIK: 'DOMESTIK', // Cargo Revamp - Domestix
|
|
10
10
|
SOURCE_YUDHA_EXCEL: 'YUDHA',
|
|
11
11
|
SOURCE_EXIM: 'EXIM',
|
|
12
12
|
SOURCE_UPLOAD_BUNDLE: 'UPLOAD-BUNDLE',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = alphaNumericCleansing;
|
|
3
4
|
function alphaNumericCleansing(text) {
|
|
4
5
|
if (typeof text !== 'string')
|
|
5
6
|
return '';
|
|
@@ -7,4 +8,3 @@ function alphaNumericCleansing(text) {
|
|
|
7
8
|
.toLowerCase()
|
|
8
9
|
.replace(/[^a-z0-9]/g, '');
|
|
9
10
|
}
|
|
10
|
-
exports.default = alphaNumericCleansing;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = terbilang;
|
|
3
4
|
function terbilang(value) {
|
|
4
5
|
const satuan = ['', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh', 'delapan', 'sembilan'];
|
|
5
6
|
const belasan = ['sepuluh', 'sebelas', 'dua belas', 'tiga belas', 'empat belas', 'lima belas', 'enam belas', 'tujuh belas', 'delapan belas', 'sembilan belas'];
|
|
@@ -41,4 +42,3 @@ function terbilang(value) {
|
|
|
41
42
|
// Menghilangkan spasi yang double
|
|
42
43
|
return result.replace(/\s+/g, ' ').trim();
|
|
43
44
|
}
|
|
44
|
-
exports.default = terbilang;
|
package/dist/helpers/axiosGet.js
CHANGED
|
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
|
|
|
13
13
|
const generateRelationId_1 = require("./generateRelationId");
|
|
14
14
|
const getCurrentDate_1 = require("./getCurrentDate");
|
|
15
15
|
const constants_1 = require("../constants");
|
|
16
|
-
exports.default = (
|
|
16
|
+
exports.default = (_a) => __awaiter(void 0, [_a], void 0, function* ({ url, headers, params, callback, }) {
|
|
17
17
|
return yield axios_1.default.get(url, {
|
|
18
18
|
params,
|
|
19
19
|
headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
|
|
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
|
|
|
13
13
|
const generateRelationId_1 = require("./generateRelationId");
|
|
14
14
|
const getCurrentDate_1 = require("./getCurrentDate");
|
|
15
15
|
const constants_1 = require("../constants");
|
|
16
|
-
exports.default = (
|
|
16
|
+
exports.default = (_a) => __awaiter(void 0, [_a], void 0, function* ({ url, headers, body, callback, }) {
|
|
17
17
|
return yield axios_1.default.post(url, body, {
|
|
18
18
|
headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
|
|
19
19
|
}).then((result) => __awaiter(void 0, void 0, void 0, function* () {
|
package/dist/helpers/axiosPut.js
CHANGED
|
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
|
|
|
13
13
|
const constants_1 = require("../constants");
|
|
14
14
|
const generateRelationId_1 = require("./generateRelationId");
|
|
15
15
|
const getCurrentDate_1 = require("./getCurrentDate");
|
|
16
|
-
exports.default = (
|
|
16
|
+
exports.default = (_a) => __awaiter(void 0, [_a], void 0, function* ({ url, headers, body, callback, }) {
|
|
17
17
|
return yield axios_1.default.put(url, body, {
|
|
18
18
|
headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
|
|
19
19
|
}).then((result) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const brokerage_1 = require("../constants/brokerage");
|
|
4
5
|
function default_1(request) {
|
|
5
6
|
try {
|
|
@@ -16,4 +17,3 @@ function default_1(request) {
|
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
exports.default = default_1;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.minusN = exports.sumN = void 0;
|
|
4
|
+
exports.sum = sum;
|
|
5
|
+
exports.minus = minus;
|
|
6
|
+
exports.multiple = multiple;
|
|
7
|
+
exports.divide = divide;
|
|
8
|
+
exports.roundTo = roundTo;
|
|
4
9
|
function sum(a, b) {
|
|
5
10
|
try {
|
|
6
11
|
if (a == null && b == null)
|
|
@@ -11,7 +16,6 @@ function sum(a, b) {
|
|
|
11
16
|
return null;
|
|
12
17
|
}
|
|
13
18
|
}
|
|
14
|
-
exports.sum = sum;
|
|
15
19
|
function minus(a, b) {
|
|
16
20
|
try {
|
|
17
21
|
if (a == null && b == null)
|
|
@@ -22,7 +26,6 @@ function minus(a, b) {
|
|
|
22
26
|
return null;
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
|
-
exports.minus = minus;
|
|
26
29
|
function multiple(a, b) {
|
|
27
30
|
try {
|
|
28
31
|
if (a == null && b == null)
|
|
@@ -33,7 +36,6 @@ function multiple(a, b) {
|
|
|
33
36
|
return null;
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
|
-
exports.multiple = multiple;
|
|
37
39
|
function roundTo(num, precision = 2) {
|
|
38
40
|
try {
|
|
39
41
|
if (num == null && precision == null)
|
|
@@ -45,7 +47,6 @@ function roundTo(num, precision = 2) {
|
|
|
45
47
|
return null;
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
|
-
exports.roundTo = roundTo;
|
|
49
50
|
function divide(a, b) {
|
|
50
51
|
try {
|
|
51
52
|
if (a == null && b == null)
|
|
@@ -58,7 +59,6 @@ function divide(a, b) {
|
|
|
58
59
|
return null;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
|
-
exports.divide = divide;
|
|
62
62
|
const sumN = (...numbers) => {
|
|
63
63
|
let result = null;
|
|
64
64
|
numbers.forEach(each => {
|
|
@@ -5,10 +5,10 @@ exports.default = (req, { isUserCodeMandatory = true } = {}) => {
|
|
|
5
5
|
if (!userCode && isUserCodeMandatory)
|
|
6
6
|
throw new Error('Usercode is not found');
|
|
7
7
|
return {
|
|
8
|
-
userCode: req.headers['x-user'] || req.headers['userCode'],
|
|
9
|
-
username: req.headers['x-username'] || req.headers['username'],
|
|
10
|
-
userEmail: req.headers['x-useremail'] || req.headers['x-user-email'] || req.headers['userEmail'],
|
|
11
|
-
isAdmin: req.headers['x-admin'] || req.headers['isAdmin'],
|
|
8
|
+
userCode: req.headers['x-user'] || req.headers['userCode'], //x-user -> isinya userCode
|
|
9
|
+
username: req.headers['x-username'] || req.headers['username'], //x-username -> isinya auth.username
|
|
10
|
+
userEmail: req.headers['x-useremail'] || req.headers['x-user-email'] || req.headers['userEmail'], //x-useremail -> isinya auth.username
|
|
11
|
+
isAdmin: req.headers['x-admin'] || req.headers['isAdmin'], //x-admin // isi 1/undefined -> jika 1 berarti admin
|
|
12
12
|
isPublic: req.headers['x-public'], //x-public isi 1/undefined -> jika 1 berarti akses public
|
|
13
13
|
};
|
|
14
14
|
};
|
package/dist/helpers/loop.js
CHANGED
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
function loop(
|
|
13
|
-
return __awaiter(this,
|
|
12
|
+
function loop(list_1, callback_1) {
|
|
13
|
+
return __awaiter(this, arguments, void 0, function* (list, callback, result = []) {
|
|
14
14
|
if (list && list.length > 0) {
|
|
15
15
|
const [head, ...tail] = list;
|
|
16
16
|
return loop(tail, callback, [yield callback(head), ...result]);
|
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
function loop(
|
|
13
|
-
return __awaiter(this,
|
|
12
|
+
function loop(list_1, callback_1) {
|
|
13
|
+
return __awaiter(this, arguments, void 0, function* (list, callback, result = []) {
|
|
14
14
|
if (list && list.length > 0) {
|
|
15
15
|
const [head, ...tail] = list;
|
|
16
16
|
return loop(tail, callback, [...result, yield callback(head)]);
|
package/package.json
CHANGED