Admin Updates.

This commit is contained in:
Patrick Fic
2021-04-20 09:01:39 -07:00
parent e2eeea2bf8
commit ab2e30894a
5 changed files with 4975 additions and 3544 deletions

View File

@@ -3,24 +3,25 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@apollo/client": "^3.2.1", "@apollo/client": "^3.3.15",
"@testing-library/jest-dom": "^5.11.4", "@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^11.0.4", "@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^12.1.6", "@testing-library/user-event": "^13.1.5",
"@types/prop-types": "^15.7.3", "@types/prop-types": "^15.7.3",
"apollo-boost": "^0.4.9", "apollo-boost": "^0.4.9",
"apollo-link-context": "^1.0.20", "apollo-link-context": "^1.0.20",
"apollo-link-logger": "^1.2.3", "apollo-link-logger": "^2.0.0",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"firebase": "^7.21.0", "firebase": "^8.4.1",
"graphql": "^15.4.0", "graphql": "^15.4.0",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"ra-data-hasura-graphql": "^0.1.12", "ra-data-hasura-graphql": "^0.1.13",
"react": "^17.0.1", "react": "^17.0.1",
"react-admin": "^3.8.5", "react-admin": "^3.14.4",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
"react-icons": "^3.11.0", "react-icons": "^4.2.0",
"react-scripts": "4.0.0" "react-scripts": "4.0.3",
"sass": "^1.32.10"
}, },
"scripts": { "scripts": {
"start": "set PORT=3001 && react-scripts start", "start": "set PORT=3001 && react-scripts start",

View File

@@ -13,6 +13,7 @@ import {
ShowGuesser, ShowGuesser,
} from "react-admin"; } from "react-admin";
import { FaFileInvoiceDollar } from "react-icons/fa"; import { FaFileInvoiceDollar } from "react-icons/fa";
import CircularProgress from "@material-ui/core/CircularProgress";
import { auth } from "../../firebase/admin-firebase-utils"; import { auth } from "../../firebase/admin-firebase-utils";
import authProvider from "../auth-provider/auth-provider"; import authProvider from "../auth-provider/auth-provider";
import JoblinesCreate from "../joblines/joblines.create"; import JoblinesCreate from "../joblines/joblines.create";
@@ -31,6 +32,7 @@ const httpLink = new HttpLink({
// 'Authorization': `Bearer xxxx`, // 'Authorization': `Bearer xxxx`,
}, },
}); });
const authLink = setContext((_, { headers }) => { const authLink = setContext((_, { headers }) => {
return ( return (
auth.currentUser && auth.currentUser &&
@@ -85,7 +87,11 @@ class AdminRoot extends Component {
const { dataProvider } = this.state; const { dataProvider } = this.state;
if (!dataProvider) { if (!dataProvider) {
return <div>Loading</div>; return (
<div>
<CircularProgress />
</div>
);
} }
return ( return (

View File

@@ -2,45 +2,26 @@ import React from "react";
//@ts-ignore //@ts-ignore
import { import {
AutocompleteInput, AutocompleteInput,
BooleanInput,
Edit, Edit,
FormTab, FormTab,
NumberInput, NumberInput,
ReferenceInput, ReferenceInput,
SelectInput, SelectInput,
SimpleForm,
TabbedForm, TabbedForm,
TextInput, TextInput,
} from "react-admin"; } from "react-admin";
const JobsEdit = (props) => ( const JobsEdit = (props) => (
<Edit {...props}> <Edit {...props}>
<TabbedForm margin="normal" variant="standard"> <TabbedForm>
<FormTab label="Record Info">
<div
style={{
columns: "3 auto",
// display: "flex",
width: "100%",
// justifyContent: "space-around",
}}
>
<TextInput disabled fullWidth source="id" />
<TextInput disabled fullWidth source="created_at" />
<TextInput disabled fullWidth source="updated_at" />
</div>
</FormTab>
<FormTab label="Job Info"> <FormTab label="Job Info">
<div <SimpleForm>
style={{
columns: "3 auto",
// display: "flex",
width: "100%",
// justifyContent: "space-around",
}}
>
<ReferenceInput label="Shopid" source="shopid" reference="bodyshops"> <ReferenceInput label="Shopid" source="shopid" reference="bodyshops">
<SelectInput disabled optionText="shopname" /> <SelectInput disabled optionText="shopname" />
</ReferenceInput> </ReferenceInput>
<TextInput fullWidth source="ro_number" /> <TextInput source="ro_number" />
<ReferenceInput label="Owner ID" source="ownerid" reference="owners"> <ReferenceInput label="Owner ID" source="ownerid" reference="owners">
<AutocompleteInput <AutocompleteInput
matchSuggestion={(filter, choice) => matchSuggestion={(filter, choice) =>
@@ -64,7 +45,7 @@ const JobsEdit = (props) => (
<ReferenceInput label="Shopid" source="shopid" reference="bodyshops"> <ReferenceInput label="Shopid" source="shopid" reference="bodyshops">
<SelectInput disabled optionText="shopname" /> <SelectInput disabled optionText="shopname" />
</ReferenceInput> </ReferenceInput>
<TextInput fullWidth source="ro_number" /> <TextInput source="ro_number" />
<ReferenceInput label="Owner ID" source="ownerid" reference="owners"> <ReferenceInput label="Owner ID" source="ownerid" reference="owners">
<AutocompleteInput <AutocompleteInput
matchSuggestion={(filter, choice) => matchSuggestion={(filter, choice) =>
@@ -85,254 +66,248 @@ const JobsEdit = (props) => (
> >
<SelectInput optionText="v_vin" /> <SelectInput optionText="v_vin" />
</ReferenceInput> </ReferenceInput>
<TextInput fullWidth source="inproduction" /> <BooleanInput source="inproduction" />
<TextInput fullWidth source="converted" /> <BooleanInput source="converted" />
</div> <TextInput disabled source="id" />
<TextInput disabled source="created_at" />
<TextInput disabled source="updated_at" />
</SimpleForm>
</FormTab> </FormTab>
<FormTab label="Labor Rates"> <FormTab label="Labor Rates">
<div <NumberInput source="labor_rate_id" />
style={{ <NumberInput source="labor_rate_desc" />
columns: "3 auto", <NumberInput source="rate_lab" />
// display: "flex", <NumberInput source="rate_lad" />
width: "100%", <NumberInput source="rate_lae" />
// justifyContent: "space-around", <NumberInput source="rate_lar" />
}} <NumberInput source="rate_las" />
> <NumberInput source="rate_laf" />
<NumberInput fullWidth source="labor_rate_id" /> <NumberInput source="rate_lam" />
<NumberInput fullWidth source="labor_rate_desc" /> <NumberInput source="rate_lag" />
<NumberInput fullWidth source="rate_lab" /> <NumberInput source="rate_atp" />
<NumberInput fullWidth source="rate_lad" /> <NumberInput source="rate_lau" />
<NumberInput fullWidth source="rate_lae" /> <NumberInput source="rate_la1" />
<NumberInput fullWidth source="rate_lar" /> <NumberInput source="rate_la2" />
<NumberInput fullWidth source="rate_las" /> <NumberInput source="rate_la3" />
<NumberInput fullWidth source="rate_laf" /> <NumberInput source="rate_la4" />
<NumberInput fullWidth source="rate_lam" /> <NumberInput source="rate_mapa" />
<NumberInput fullWidth source="rate_lag" /> <NumberInput source="rate_mash" />
<NumberInput fullWidth source="rate_atp" /> <NumberInput source="rate_mahw" />
<NumberInput fullWidth source="rate_lau" /> <NumberInput source="rate_ma2s" />
<NumberInput fullWidth source="rate_la1" /> <NumberInput source="rate_ma3s" />
<NumberInput fullWidth source="rate_la2" /> <NumberInput source="rate_ma2t" />
<NumberInput fullWidth source="rate_la3" /> <NumberInput source="rate_mabl" />
<NumberInput fullWidth source="rate_la4" /> <NumberInput source="rate_macs" />
<NumberInput fullWidth source="rate_mapa" /> <NumberInput source="rate_matd" />
<NumberInput fullWidth source="rate_mash" /> <NumberInput source="federal_tax_rate" />
<NumberInput fullWidth source="rate_mahw" /> <NumberInput source="state_tax_rate" />
<NumberInput fullWidth source="rate_ma2s" /> <NumberInput source="local_tax_rate" />
<NumberInput fullWidth source="rate_ma3s" />
<NumberInput fullWidth source="rate_ma2t" />
<NumberInput fullWidth source="rate_mabl" />
<NumberInput fullWidth source="rate_macs" />
<NumberInput fullWidth source="rate_matd" />
<NumberInput fullWidth source="federal_tax_rate" />
<NumberInput fullWidth source="state_tax_rate" />
<NumberInput fullWidth source="local_tax_rate" />
</div>
</FormTab> </FormTab>
<FormTab label="Dates"> <FormTab label="Dates">
<TextInput fullWidth source="scheduled_in" /> <TextInput source="scheduled_in" />
<TextInput fullWidth source="actual_in" /> <TextInput source="actual_in" />
<TextInput fullWidth source="scheduled_completion" /> <TextInput source="scheduled_completion" />
<TextInput fullWidth source="actual_completion" /> <TextInput source="actual_completion" />
<TextInput fullWidth source="scheduled_delivery" /> <TextInput source="scheduled_delivery" />
<TextInput fullWidth source="actual_delivery" /> <TextInput source="actual_delivery" />
<TextInput fullWidth source="invoice_date" /> <TextInput source="invoice_date" />
<TextInput fullWidth source="date_estimated" /> <TextInput source="date_estimated" />
<TextInput fullWidth source="date_open" /> <TextInput source="date_open" />
<TextInput fullWidth source="date_scheduled" /> <TextInput source="date_scheduled" />
<TextInput fullWidth source="date_invoiced" /> <TextInput source="date_invoiced" />
<TextInput fullWidth source="date_exported" /> <TextInput source="date_exported" />
</FormTab> </FormTab>
<FormTab label="Insurance info"> <FormTab label="Insurance info">
<TextInput fullWidth source="est_co_nm" /> <TextInput source="est_co_nm" />
<TextInput fullWidth source="est_addr1" /> <TextInput source="est_addr1" />
<TextInput fullWidth source="est_addr2" /> <TextInput source="est_addr2" />
<TextInput fullWidth source="est_city" /> <TextInput source="est_city" />
<TextInput fullWidth source="est_st" /> <TextInput source="est_st" />
<TextInput fullWidth source="est_zip" /> <TextInput source="est_zip" />
<TextInput fullWidth source="est_ctry" /> <TextInput source="est_ctry" />
<TextInput fullWidth source="est_ph1" /> <TextInput source="est_ph1" />
<TextInput fullWidth source="est_ea" /> <TextInput source="est_ea" />
<TextInput fullWidth source="est_ct_ln" /> <TextInput source="est_ct_ln" />
<TextInput fullWidth source="est_ct_fn" /> <TextInput source="est_ct_fn" />
<TextInput fullWidth source="regie_number" /> <TextInput source="regie_number" />
<TextInput fullWidth source="statusid" /> <TextInput source="statusid" />
<TextInput fullWidth source="ins_co_id" /> <TextInput source="ins_co_id" />
<TextInput fullWidth source="ins_co_nm" /> <TextInput source="ins_co_nm" />
<TextInput fullWidth source="ins_addr1" /> <TextInput source="ins_addr1" />
<TextInput fullWidth source="ins_addr2" /> <TextInput source="ins_addr2" />
<TextInput fullWidth source="ins_city" /> <TextInput source="ins_city" />
<TextInput fullWidth source="ins_st" /> <TextInput source="ins_st" />
<TextInput fullWidth source="ins_zip" /> <TextInput source="ins_zip" />
<TextInput fullWidth source="ins_ctry" /> <TextInput source="ins_ctry" />
<TextInput fullWidth source="ins_ph1" /> <TextInput source="ins_ph1" />
<TextInput fullWidth source="ins_ph1x" /> <TextInput source="ins_ph1x" />
<TextInput fullWidth source="ins_ph2" /> <TextInput source="ins_ph2" />
<TextInput fullWidth source="ins_ph2x" /> <TextInput source="ins_ph2x" />
<TextInput fullWidth source="ins_fax" /> <TextInput source="ins_fax" />
<TextInput fullWidth source="ins_faxx" /> <TextInput source="ins_faxx" />
<TextInput fullWidth source="ins_ct_ln" /> <TextInput source="ins_ct_ln" />
<TextInput fullWidth source="ins_ct_fn" /> <TextInput source="ins_ct_fn" />
<TextInput fullWidth source="ins_title" /> <TextInput source="ins_title" />
<TextInput fullWidth source="ins_ct_ph" /> <TextInput source="ins_ct_ph" />
<TextInput fullWidth source="ins_ct_phx" /> <TextInput source="ins_ct_phx" />
<TextInput fullWidth source="ins_ea" /> <TextInput source="ins_ea" />
<TextInput fullWidth source="ins_memo" /> <TextInput source="ins_memo" />
<TextInput fullWidth source="policy_no" /> <TextInput source="policy_no" />
<TextInput fullWidth source="ded_amt" /> <TextInput source="ded_amt" />
<TextInput fullWidth source="ded_status" /> <TextInput source="ded_status" />
<TextInput fullWidth source="asgn_no" /> <TextInput source="asgn_no" />
<TextInput fullWidth source="asgn_date" /> <TextInput source="asgn_date" />
<TextInput fullWidth source="asgn_type" /> <TextInput source="asgn_type" />
<TextInput fullWidth source="clm_no" /> <TextInput source="clm_no" />
<TextInput fullWidth source="clm_ofc_id" /> <TextInput source="clm_ofc_id" />
<TextInput fullWidth source="agt_co_id" /> <TextInput source="agt_co_id" />
<TextInput fullWidth source="agt_co_nm" /> <TextInput source="agt_co_nm" />
<TextInput fullWidth source="agt_addr1" /> <TextInput source="agt_addr1" />
<TextInput fullWidth source="agt_addr2" /> <TextInput source="agt_addr2" />
<TextInput fullWidth source="agt_city" /> <TextInput source="agt_city" />
<TextInput fullWidth source="agt_st" /> <TextInput source="agt_st" />
<TextInput fullWidth source="agt_zip" /> <TextInput source="agt_zip" />
<TextInput fullWidth source="agt_ctry" /> <TextInput source="agt_ctry" />
<TextInput fullWidth source="agt_ph1" /> <TextInput source="agt_ph1" />
<TextInput fullWidth source="agt_ph1x" /> <TextInput source="agt_ph1x" />
<TextInput fullWidth source="agt_ph2" /> <TextInput source="agt_ph2" />
<TextInput fullWidth source="agt_ph2x" /> <TextInput source="agt_ph2x" />
<TextInput fullWidth source="agt_fax" /> <TextInput source="agt_fax" />
<TextInput fullWidth source="agt_faxx" /> <TextInput source="agt_faxx" />
<TextInput fullWidth source="agt_ct_ln" /> <TextInput source="agt_ct_ln" />
<TextInput fullWidth source="agt_ct_fn" /> <TextInput source="agt_ct_fn" />
<TextInput fullWidth source="agt_ct_ph" /> <TextInput source="agt_ct_ph" />
<TextInput fullWidth source="agt_ct_phx" /> <TextInput source="agt_ct_phx" />
<TextInput fullWidth source="agt_ea" /> <TextInput source="agt_ea" />
<TextInput fullWidth source="agt_lic_no" /> <TextInput source="agt_lic_no" />
<TextInput fullWidth source="loss_type" /> <TextInput source="loss_type" />
<TextInput fullWidth source="loss_desc" /> <TextInput source="loss_desc" />
<TextInput fullWidth source="theft_ind" /> <TextInput source="theft_ind" />
<TextInput fullWidth source="cat_no" /> <TextInput source="cat_no" />
<TextInput fullWidth source="tlos_ind" /> <TextInput source="tlos_ind" />
<TextInput fullWidth source="ciecaid" /> <TextInput source="ciecaid" />
<TextInput fullWidth source="loss_date" /> <TextInput source="loss_date" />
<TextInput fullWidth source="clm_ofc_nm" /> <TextInput source="clm_ofc_nm" />
<TextInput fullWidth source="clm_addr1" /> <TextInput source="clm_addr1" />
<TextInput fullWidth source="clm_addr2" /> <TextInput source="clm_addr2" />
<TextInput fullWidth source="clm_city" /> <TextInput source="clm_city" />
<TextInput fullWidth source="clm_st" /> <TextInput source="clm_st" />
<TextInput fullWidth source="clm_zip" /> <TextInput source="clm_zip" />
<TextInput fullWidth source="clm_ctry" /> <TextInput source="clm_ctry" />
<TextInput fullWidth source="clm_ph1" /> <TextInput source="clm_ph1" />
<TextInput fullWidth source="clm_ph1x" /> <TextInput source="clm_ph1x" />
<TextInput fullWidth source="clm_ph2" /> <TextInput source="clm_ph2" />
<TextInput fullWidth source="clm_ph2x" /> <TextInput source="clm_ph2x" />
<TextInput fullWidth source="clm_fax" /> <TextInput source="clm_fax" />
<TextInput fullWidth source="clm_faxx" /> <TextInput source="clm_faxx" />
<TextInput fullWidth source="clm_ct_ln" /> <TextInput source="clm_ct_ln" />
<TextInput fullWidth source="clm_ct_fn" /> <TextInput source="clm_ct_fn" />
<TextInput fullWidth source="clm_title" /> <TextInput source="clm_title" />
<TextInput fullWidth source="clm_ct_ph" /> <TextInput source="clm_ct_ph" />
<TextInput fullWidth source="clm_ct_phx" /> <TextInput source="clm_ct_phx" />
<TextInput fullWidth source="clm_ea" /> <TextInput source="clm_ea" />
<TextInput fullWidth source="payee_nms" /> <TextInput source="payee_nms" />
<TextInput fullWidth source="pay_type" /> <TextInput source="pay_type" />
<TextInput fullWidth source="pay_date" /> <TextInput source="pay_date" />
<TextInput fullWidth source="pay_chknm" /> <TextInput source="pay_chknm" />
<TextInput fullWidth source="pay_amt" /> <TextInput source="pay_amt" />
</FormTab> </FormTab>
<FormTab label="Owner Data on Job"> <FormTab label="Owner Data on Job">
<TextInput fullWidth source="cust_pr" /> <TextInput source="cust_pr" />
<TextInput fullWidth source="insd_ln" /> <TextInput source="insd_ln" />
<TextInput fullWidth source="insd_fn" /> <TextInput source="insd_fn" />
<TextInput fullWidth source="insd_title" /> <TextInput source="insd_title" />
<TextInput fullWidth source="insd_co_nm" /> <TextInput source="insd_co_nm" />
<TextInput fullWidth source="insd_addr1" /> <TextInput source="insd_addr1" />
<TextInput fullWidth source="insd_addr2" /> <TextInput source="insd_addr2" />
<TextInput fullWidth source="insd_city" /> <TextInput source="insd_city" />
<TextInput fullWidth source="insd_st" /> <TextInput source="insd_st" />
<TextInput fullWidth source="insd_zip" /> <TextInput source="insd_zip" />
<TextInput fullWidth source="insd_ctry" /> <TextInput source="insd_ctry" />
<TextInput fullWidth source="insd_ph1" /> <TextInput source="insd_ph1" />
<TextInput fullWidth source="insd_ph1x" /> <TextInput source="insd_ph1x" />
<TextInput fullWidth source="insd_ph2" /> <TextInput source="insd_ph2" />
<TextInput fullWidth source="insd_ph2x" /> <TextInput source="insd_ph2x" />
<TextInput fullWidth source="insd_fax" /> <TextInput source="insd_fax" />
<TextInput fullWidth source="insd_faxx" /> <TextInput source="insd_faxx" />
<TextInput fullWidth source="insd_ea" /> <TextInput source="insd_ea" />
<TextInput fullWidth source="ownr_ln" /> <TextInput source="ownr_ln" />
<TextInput fullWidth source="ownr_fn" /> <TextInput source="ownr_fn" />
<TextInput fullWidth source="ownr_title" /> <TextInput source="ownr_title" />
<TextInput fullWidth source="ownr_co_nm" /> <TextInput source="ownr_co_nm" />
<TextInput fullWidth source="ownr_addr1" /> <TextInput source="ownr_addr1" />
<TextInput fullWidth source="ownr_addr2" /> <TextInput source="ownr_addr2" />
<TextInput fullWidth source="ownr_city" /> <TextInput source="ownr_city" />
<TextInput fullWidth source="ownr_st" /> <TextInput source="ownr_st" />
<TextInput fullWidth source="ownr_zip" /> <TextInput source="ownr_zip" />
<TextInput fullWidth source="ownr_ctry" /> <TextInput source="ownr_ctry" />
<TextInput fullWidth source="ownr_ph1" /> <TextInput source="ownr_ph1" />
<TextInput fullWidth source="ownr_ph1x" /> <TextInput source="ownr_ph1x" />
<TextInput fullWidth source="ownr_ph2" /> <TextInput source="ownr_ph2" />
<TextInput fullWidth source="ownr_ph2x" /> <TextInput source="ownr_ph2x" />
<TextInput fullWidth source="ownr_fax" /> <TextInput source="ownr_fax" />
<TextInput fullWidth source="ownr_faxx" /> <TextInput source="ownr_faxx" />
<TextInput fullWidth source="ownr_ea" /> <TextInput source="ownr_ea" />
</FormTab> </FormTab>
<FormTab label="Financial"> <FormTab label="Financial">
<TextInput fullWidth source="clm_total" /> <TextInput source="clm_total" />
<TextInput fullWidth source="owner_owing" /> <TextInput source="owner_owing" />
</FormTab> </FormTab>
<FormTab label="Other"> <FormTab label="Other">
<TextInput fullWidth source="area_of_damage" /> <TextInput source="area_of_damage" />
<TextInput fullWidth source="loss_cat" /> <TextInput source="loss_cat" />
<TextInput fullWidth source="special_coverage_policy" /> <TextInput source="special_coverage_policy" />
<TextInput fullWidth source="csr" /> <TextInput source="csr" />
<TextInput fullWidth source="po_number" /> <TextInput source="po_number" />
<TextInput fullWidth source="unit_number" /> <TextInput source="unit_number" />
<TextInput fullWidth source="kmin" /> <TextInput source="kmin" />
<TextInput fullWidth source="kmout" /> <TextInput source="kmout" />
<TextInput fullWidth source="referral_source" /> <TextInput source="referral_source" />
<TextInput fullWidth source="selling_dealer" /> <TextInput source="selling_dealer" />
<TextInput fullWidth source="servicing_dealer" /> <TextInput source="servicing_dealer" />
<TextInput fullWidth source="servicing_dealer_contact" /> <TextInput source="servicing_dealer_contact" />
<TextInput fullWidth source="selling_dealer_contact" /> <TextInput source="selling_dealer_contact" />
<TextInput fullWidth source="depreciation_taxes" /> <TextInput source="depreciation_taxes" />
<TextInput fullWidth source="federal_tax_payable" /> <TextInput source="federal_tax_payable" />
<TextInput fullWidth source="other_amount_payable" /> <TextInput source="other_amount_payable" />
<TextInput fullWidth source="towing_payable" /> <TextInput source="towing_payable" />
<TextInput fullWidth source="storage_payable" /> <TextInput source="storage_payable" />
<TextInput fullWidth source="adjustment_bottom_line" /> <TextInput source="adjustment_bottom_line" />
<TextInput fullWidth source="tax_pstthr" /> <TextInput source="tax_pstthr" />
<TextInput fullWidth source="tax_tow_rt" /> <TextInput source="tax_tow_rt" />
<TextInput fullWidth source="tax_sub_rt" /> <TextInput source="tax_sub_rt" />
<TextInput fullWidth source="tax_paint_mat_rt" /> <TextInput source="tax_paint_mat_rt" />
<TextInput fullWidth source="tax_levies_rt" /> <TextInput source="tax_levies_rt" />
<TextInput fullWidth source="tax_prethr" /> <TextInput source="tax_prethr" />
<TextInput fullWidth source="tax_thramt" /> <TextInput source="tax_thramt" />
<TextInput fullWidth source="tax_str_rt" /> <TextInput source="tax_str_rt" />
<TextInput fullWidth source="tax_lbr_rt" /> <TextInput source="tax_lbr_rt" />
<TextInput fullWidth source="adj_g_disc" /> <TextInput source="adj_g_disc" />
<TextInput fullWidth source="adj_towdis" /> <TextInput source="adj_towdis" />
<TextInput fullWidth source="adj_strdis" /> <TextInput source="adj_strdis" />
<TextInput fullWidth source="tax_predis" /> <TextInput source="tax_predis" />
<TextInput fullWidth source="rate_laa" /> <TextInput source="rate_laa" />
<TextInput fullWidth source="status" /> <TextInput source="status" />
<TextInput fullWidth source="cieca_stl" /> <TextInput source="cieca_stl" />
<TextInput fullWidth source="g_bett_amt" /> <TextInput source="g_bett_amt" />
<TextInput fullWidth source="cieca_ttl" /> <TextInput source="cieca_ttl" />
<TextInput fullWidth source="plate_no" /> <TextInput source="plate_no" />
<TextInput fullWidth source="plate_st" /> <TextInput source="plate_st" />
<TextInput fullWidth source="v_vin" /> <TextInput source="v_vin" />
<TextInput fullWidth source="v_model_yr" /> <TextInput source="v_model_yr" />
<TextInput fullWidth source="v_model_desc" /> <TextInput source="v_model_desc" />
<TextInput fullWidth source="v_make_desc" /> <TextInput source="v_make_desc" />
<TextInput fullWidth source="v_color" /> <TextInput source="v_color" />
<TextInput fullWidth source="parts_tax_rates" /> <TextInput source="parts_tax_rates" />
<TextInput fullWidth source="job_totals" /> <TextInput source="job_totals" />
<TextInput fullWidth source="production_vars" /> <TextInput source="production_vars" />
<TextInput fullWidth source="intakechecklist" /> <TextInput source="intakechecklist" />
<TextInput fullWidth source="invoice_allocation" /> <TextInput source="invoice_allocation" />
<TextInput fullWidth source="kanbanparent" /> <TextInput source="kanbanparent" />
<TextInput fullWidth source="employee_body" /> <TextInput source="employee_body" />
<TextInput fullWidth source="employee_refinish" /> <TextInput source="employee_refinish" />
<TextInput fullWidth source="employee_prep" /> <TextInput source="employee_prep" />
</FormTab> </FormTab>
</TabbedForm> </TabbedForm>
</Edit> </Edit>

View File

@@ -8,31 +8,35 @@ import {
ReferenceField, ReferenceField,
SelectInput, SelectInput,
TextField, TextField,
TextInput TextInput,
} from "react-admin"; } from "react-admin";
import { QUERY_ALL_SHOPS } from "../../graphql/admin.shop.queries"; import { QUERY_ALL_SHOPS } from "../../graphql/admin.shop.queries";
const JobsList = (props) => ( const JobsList = (props) => (
<List filters={<JobsFilter />} {...props}> <List filters={<JobsFilter />} {...props}>
<Datagrid rowClick="edit"> <Datagrid rowClick="edit">
<TextField source="id" /> <TextField source="id" label="Job ID" />
<ReferenceField source="shopid" reference="bodyshops"> <ReferenceField source="shopid" reference="bodyshops" label="Shop Name">
<TextField source="shopname" /> <TextField source="shopname" />
</ReferenceField> </ReferenceField>
<TextField source="ro_number" /> <TextField source="ro_number" label="RO Number" />
<TextField source="ownr_fn" /> <TextField source="ownr_fn" label="Owner FN" />
<TextField source="ownr_ln" /> <TextField source="ownr_ln" label="Owner LN" />
<TextField source="ownr_co_nm" /> <TextField source="ownr_co_nm" label="Owner CO" />
<ReferenceField source="ownerid" reference="owners"> <ReferenceField source="ownerid" reference="owners" label="Owner Record">
<TextField source="id" /> <TextField source="id" />
</ReferenceField> </ReferenceField>
<TextField source="v_model_yr" /> <TextField source="v_model_yr" label="Year" />
<TextField source="v_make_desc" /> <TextField source="v_make_desc" label="Make" />
<TextField source="v_model_desc" /> <TextField source="v_model_desc" label="Model" />
<ReferenceField source="vehicleid" reference="vehicles"> <ReferenceField
source="vehicleid"
reference="vehicles"
label="Vehicle ID"
>
<TextField source="id" /> <TextField source="id" />
</ReferenceField> </ReferenceField>
</Datagrid> </Datagrid>
@@ -47,13 +51,13 @@ const JobsFilter = (props) => {
return ( return (
<Filter {...props}> <Filter {...props}>
<TextInput label="RO Number" source="ro_number" /> <TextInput label="RO Number" source="ro_number" />
<TextInput label="Job ID" source="id" />
<SelectInput <SelectInput
source="shopid" source="shopid"
label="Bodyshop"
choices={data.bodyshops.map((b) => { choices={data.bodyshops.map((b) => {
return { id: b.id, name: b.shopname }; return { id: b.id, name: b.shopname };
})} })}
alwaysOn
allowEmpty={false}
/> />
</Filter> </Filter>
); );

File diff suppressed because it is too large Load Diff