WIP Loading Header & Remaining changes from Sprint 1

This commit is contained in:
Patrick Fic
2020-03-13 19:02:31 -07:00
parent f9fb5e4dc0
commit ca457c76ab
16 changed files with 663 additions and 29 deletions

View File

@@ -1,9 +1,5 @@
import {
DeleteFilled,
PlusCircleFilled,
SyncOutlined
} from "@ant-design/icons";
import { Button, notification, Table, Typography } from "antd";
import { DeleteFilled, PlusCircleFilled, SyncOutlined } from "@ant-design/icons";
import { Button, notification, Table } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import CurrencyFormatter from "../../utils/CurrencyFormatter";

View File

@@ -11,6 +11,7 @@ import { UPDATE_JOB } from "../../graphql/jobs.queries";
import AlertComponent from "../alert/alert.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import JobsAvailableSupplementComponent from "./jobs-available-supplement.component";
import HeaderFields from "./jobs-available-supplement.headerfields";
export default withRouter(function JobsAvailableSupplementContainer({
deleteJob,
@@ -53,15 +54,14 @@ export default withRouter(function JobsAvailableSupplementContainer({
} else {
//create upsert job
let supp = estData.data.available_jobs_by_pk.est_data;
console.log("supp before", supp);
delete supp.joblines;
//TODO How to update the estimate lines.
delete supp.owner;
delete supp.vehicle;
if (!importOptions.overrideHeaders) {
const FieldsToDelete = ["ins_ea"]; //AD1 or AD2 or VEH
delete supp["ins_ea"];
//TODO Remove all required fields.
if (importOptions.overrideHeaders) {
HeaderFields.forEach(item => delete supp[item]);
}
updateJob({

View File

@@ -0,0 +1,225 @@
const headerFields = [
//AD1
"ins_co_id",
"ins_co_nm",
"ins_addr1",
"ins_addr2",
"ins_city",
"ins_st",
"ins_zip",
"ins_ctry",
"ins_ea",
"policy_no",
"ded_amt",
"ded_status",
"asgn_no",
"asgn_date",
"asgn_type",
"clm_no",
"clm_ofc_id",
"clm_ofc_nm",
"clm_addr1",
"clm_addr2",
"clm_city",
"clm_st",
"clm_zip",
"clm_ctry",
"clm_ph1",
"clm_ph1x",
"clm_ph2",
"clm_ph2x",
"clm_fax",
"clm_faxx",
"clm_ct_ln",
"clm_ct_fn",
"clm_title",
"clm_ct_ph",
"clm_ct_phx",
"clm_ea",
"payee_nms",
"pay_type",
"pay_date",
"pay_chknm",
"pay_amt",
"agt_co_id",
"agt_co_nm",
"agt_addr1",
"agt_addr2",
"agt_city",
"agt_st",
"agt_zip",
"agt_ctry",
"agt_ph1",
"agt_ph1x",
"agt_ph2",
"agt_ph2x",
"agt_fax",
"agt_faxx",
"agt_ct_ln",
"agt_ct_fn",
"agt_ct_ph",
"agt_ct_phx",
"agt_ea",
"agt_lic_no",
"loss_date",
"loss_type",
"loss_desc",
"theft_ind",
"cat_no",
"tlos_ind",
"cust_pr",
"insd_ln",
"insd_fn",
"insd_title",
"insd_co_nm",
"insd_addr1",
"insd_addr2",
"insd_city",
"insd_st",
"insd_zip",
"insd_ctry",
"insd_ph1",
"insd_ph1x",
"insd_ph2",
"insd_ph2x",
"insd_fax",
"insd_faxx",
"insd_ea",
"ownr_ln",
"ownr_fn",
"ownr_title",
"ownr_co_nm",
"ownr_addr1",
"ownr_addr2",
"ownr_city",
"ownr_st",
"ownr_zip",
"ownr_ctry",
"ownr_ph1",
"ownr_ph1x",
"ownr_ph2",
"ownr_ph2x",
"ownr_fax",
"ownr_faxx",
"ownr_ea",
"ins_ph1",
"ins_ph1x",
"ins_ph2",
"ins_ph2x",
"ins_fax",
"ins_faxx",
"ins_ct_ln",
"ins_ct_fn",
"ins_title",
"ins_ct_ph",
"ins_ct_phx",
"loss_cat",
//ad2
"clmt_ln",
"clmt_fn",
"clmt_title",
"clmt_co_nm",
"clmt_addr1",
"clmt_addr2",
"clmt_city",
"clmt_st",
"clmt_zip",
"clmt_ctry",
"clmt_ph1",
"clmt_ph1x",
"clmt_ph2",
"clmt_ph2x",
"clmt_fax",
"clmt_faxx",
"clmt_ea",
"est_co_id",
"est_co_nm",
"est_addr1",
"est_addr2",
"est_city",
"est_st",
"est_zip",
"est_ctry",
"est_ph1",
"est_ph1x",
"est_ph2",
"est_ph2x",
"est_fax",
"est_faxx",
"est_ct_ln",
"est_ct_fn",
"est_ea",
"est_lic_no",
"est_fileno",
"insp_ct_ln",
"insp_ct_fn",
"insp_addr1",
"insp_addr2",
"insp_city",
"insp_st",
"insp_zip",
"insp_ctry",
"insp_ph1",
"insp_ph1x",
"insp_ph2",
"insp_ph2x",
"insp_fax",
"insp_faxx",
"insp_ea",
"insp_code",
"insp_desc",
"insp_date",
"insp_time",
"rf_co_id",
"rf_co_nm",
"rf_addr1",
"rf_addr2",
"rf_city",
"rf_st",
"rf_zip",
"rf_ctry",
"rf_ph1",
"rf_ph1x",
"rf_ph2",
"rf_ph2x",
"rf_fax",
"rf_faxx",
"rf_ct_ln",
"rf_ct_fn",
"rf_ea",
"rf_tax_id",
"rf_lic_no",
"rf_bar_no",
"ro_in_date",
"ro_in_time",
"tar_date",
"tar_time",
"ro_cmpdate",
"ro_cmptime",
"date_out",
"time_out",
"rf_estimtr",
"mktg_type",
"mktg_src",
"loc_nm",
"loc_addr1",
"loc_addr2",
"loc_city",
"loc_st",
"loc_zip",
"loc_ctry",
"loc_ph1",
"loc_ph1x",
"loc_ph2",
"loc_ph2x",
"loc_fax",
"loc_faxx",
"loc_ct_ln",
"loc_ct_fn",
"loc_title",
"loc_ph",
"loc_phx",
"loc_ea"
];
export default headerFields;