Capture additional fields for Mexico.

This commit is contained in:
Patrick Fic
2025-09-10 13:53:08 -07:00
parent e52bc877a7
commit fe78c07898
9 changed files with 93 additions and 64 deletions

View File

@@ -64,6 +64,7 @@ async function DecodeEstimate(filePath, includeFilePathInReturnJob = false, clos
job.rates = [...job.rates || [], ...job.mat_rates || []];
delete job.mat_rates
job.insp_date = ad2.INSP_DATE;
if (job.OWNR_FN === "" || !job.OWNR_FN) job.OWNR_FN = ad2.CLMT_FN;
if (job.OWNR_LN === "" || !job.OWNR_LN) job.OWNR_LN = ad2.CLMT_LN;
@@ -186,9 +187,9 @@ async function DecodeAd1File(extensionlessFilePath) {
"LOSS_DATE",
"LOSS_TYPE",
"LOSS_DESC",
// "THEFT_IND",
"THEFT_IND",
// "CAT_NO",
// "TLOS_IND",
"TLOS_IND",
// "CUST_PR",
// "INSD_LN",
// "INSD_FN",
@@ -251,7 +252,7 @@ async function DecodeAd2File(extensionlessFilePath) {
} finally {
if (!dbf) return {};
let records = await dbf.readRecords(1);
return _.pick(records[0], ["CLMT_LN", "CLMT_FN"]);
return _.pick(records[0], ["CLMT_LN", "CLMT_FN", "INSP_DATE"]);
}
}

View File

@@ -23,82 +23,88 @@ insert_permissions:
authid:
_eq: X-Hasura-User-Id
columns:
- id
- bodyshopid
- created_at
- updated_at
- ro_number
- ins_co_nm
- clm_no
- clm_total
- close_date
- created_at
- ded_amt
- est_system
- g_bett_amt
- ownr_ln
- ownr_fn
- v_vin
- v_makedesc
- v_model
- v_model_yr
- v_type
- group
- group_verified
- id
- id_pro_nam
- impact_1
- impact_2
- ins_co_nm
- v_mileage
- v_age
- loss_date
- close_date
- group_verified
- requires_reimport
- ded_amt
- loss_desc
- ownr_addr1
- ownr_city
- ownr_fn
- ownr_ln
- ownr_ph1
- rates
- requires_reimport
- ro_number
- supp_amt
- totals
- updated_at
- v_age
- v_makedesc
- v_mileage
- v_model
- v_model_yr
- v_stage
- v_type
- v_vin
- rates
- totals
- supp_amt
- g_bett_amt
- id_pro_nam
- impact_1
- impact_2
- est_system
- tlos_ind
- theft_ind
- insp_date
select_permissions:
- role: user
permission:
columns:
- bodyshopid
- clm_no
- clm_total
- close_date
- created_at
- ded_amt
- est_system
- g_bett_amt
- group
- group_verified
- id
- requires_reimport
- theft_ind
- tlos_ind
- close_date
- insp_date
- loss_date
- rates
- totals
- clm_total
- ded_amt
- g_bett_amt
- supp_amt
- v_age
- v_mileage
- v_stage
- clm_no
- est_system
- group
- id_pro_nam
- impact_1
- impact_2
- ins_co_nm
- loss_date
- loss_desc
- ownr_addr1
- ownr_city
- ownr_fn
- ownr_ln
- ownr_ph1
- rates
- requires_reimport
- ro_number
- supp_amt
- totals
- updated_at
- v_age
- v_makedesc
- v_mileage
- v_model
- v_model_yr
- v_stage
- v_type
- v_vin
- created_at
- updated_at
- bodyshopid
- id
filter:
bodyshop:
associations:
@@ -110,41 +116,45 @@ update_permissions:
- role: user
permission:
columns:
- bodyshopid
- clm_no
- clm_total
- group_verified
- requires_reimport
- theft_ind
- tlos_ind
- close_date
- created_at
- insp_date
- loss_date
- rates
- totals
- clm_total
- ded_amt
- g_bett_amt
- supp_amt
- v_age
- v_mileage
- v_stage
- clm_no
- est_system
- group
- group_verified
- id
- id_pro_nam
- impact_1
- impact_2
- ins_co_nm
- loss_date
- loss_desc
- ownr_addr1
- ownr_city
- ownr_fn
- ownr_ln
- ownr_ph1
- rates
- requires_reimport
- ro_number
- supp_amt
- totals
- updated_at
- v_age
- v_makedesc
- v_mileage
- v_model
- v_model_yr
- v_stage
- v_type
- v_vin
- created_at
- updated_at
- bodyshopid
- id
filter:
bodyshop:
associations:

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."jobs" add column "tlos_ind" boolean
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."jobs" add column "tlos_ind" boolean
null;

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."jobs" add column "theft_ind" boolean
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."jobs" add column "theft_ind" boolean
null;

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."jobs" add column "insp_date" date
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."jobs" add column "insp_date" date
null;

View File

@@ -3,7 +3,7 @@
"productName": "ImEX RPS",
"author": "ImEX Systems Inc. <support@thinkimex.com>",
"description": "ImEX RPS",
"version": "1.4.2-alpha.12",
"version": "1.4.2-alpha.13",
"main": "electron/main.js",
"homepage": "./",
"dependencies": {