@provis/provis-common-be-module 2.2.14 → 2.2.16

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.
@@ -205,15 +205,18 @@ class MainRepository extends typeorm_1.Repository {
205
205
  if (valueSearch) {
206
206
  if (index == 0) {
207
207
  if (isFirstJoin) {
208
+ // where for first join in left join after primary, ex claim ... and (this) claimCargo ...
208
209
  query = query.andWhere(`${relation.model}.${valueSearch.query}`, { [valueSearch.key]: valueSearch.value });
209
210
  isFirstJoin = false;
210
211
  }
211
212
  else {
213
+ // for next join in left join , ex claim ... and claimCargo ... or (this) claimKalog ...
212
214
  query = query.orWhere(`${relation.model}.${valueSearch.query}`, { [valueSearch.key]: valueSearch.value });
213
215
  }
214
216
  index++;
215
217
  }
216
218
  else {
219
+ // for next where in left join , ex claim ... and claimCargo ... or claimKalog ... and (this) claimKalog ...
217
220
  query = query.andWhere(`${relation.model}.${valueSearch.query}`, { [valueSearch.key]: valueSearch.value });
218
221
  }
219
222
  }
@@ -31,7 +31,7 @@ doc.LIST_DESC = {
31
31
  en: "Completely filled out claim form with details of loss amount",
32
32
  },
33
33
  [doc.DOC_INVOICE]: {
34
- id: "Dokumen Tagihan Nilai Barang",
34
+ id: "Dokumen Tagihan NIlai Barang / Nota Nilai Barang",
35
35
  en: "Goods Value Invoice documents",
36
36
  },
37
37
  [doc.DOC_OPENING]: {
@@ -111,40 +111,12 @@ doc.RISK_CONFIG['001'] = {
111
111
  doc.DOC_POLICE_REPORT,
112
112
  ],
113
113
  };
114
- doc.DOCUMENT_CONFIG[doc.DOC_RESI] = {
115
- desc: {
116
- id: 'Foto Resi',
117
- en: 'Photo of Receipt',
118
- },
119
- };
120
- doc.DOCUMENT_CONFIG[doc.DOC_CLAIM] = {
121
- desc: {
122
- id: 'Formulir klaim yang telah diisi lengkap disertai dengan perincian jumlah kerugian',
123
- en: 'Completely filled out claim form with details of loss amount',
124
- },
125
- };
126
- doc.DOCUMENT_CONFIG[doc.DOC_INVOICE] = {
127
- desc: {
128
- id: 'Dokumen Tagihan Nilai Barang',
129
- en: 'Goods Value Invoice documents',
130
- },
131
- };
132
- doc.DOCUMENT_CONFIG[doc.DOC_OPENING] = {
133
- desc: {
134
- id: 'Rekaman vidio pembukaan barang',
135
- en: 'Video recording of opening of goods',
136
- },
137
- };
138
- doc.DOCUMENT_CONFIG[doc.DOC_DOCUMENTATION] = {
139
- desc: {
140
- id: 'Foto - foto dokumentasi barang yang rusak',
141
- en: 'Documentation photos of damaged goods',
142
- },
143
- };
144
- doc.DOCUMENT_CONFIG[doc.DOC_POLICE_REPORT] = {
145
- desc: {
146
- id: 'Laporan Kepolisian',
147
- en: 'Police report',
148
- },
149
- };
114
+ [doc.DOC_RESI, doc.DOC_CLAIM, doc.DOC_INVOICE, doc.DOC_OPENING, doc.DOC_DOCUMENTATION, doc.DOC_POLICE_REPORT].map((value) => {
115
+ doc.DOCUMENT_CONFIG[value] = {
116
+ desc: {
117
+ id: doc.LIST_DESC[value]['id'],
118
+ en: doc.LIST_DESC[value]['en'],
119
+ },
120
+ };
121
+ });
150
122
  exports.default = doc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provis/provis-common-be-module",
3
- "version": "2.2.14",
3
+ "version": "2.2.16",
4
4
  "description": "This common module for Provis internal backend use lib",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {