IO-1437 Add deductible Note

This commit is contained in:
Patrick Fic
2021-10-18 22:02:45 -07:00
parent db9744e1e5
commit 1ca2870912
14 changed files with 88 additions and 1 deletions

View File

@@ -4283,6 +4283,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>md_ded_notes</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<folder_node> <folder_node>
<name>md_hour_split</name> <name>md_hour_split</name>
<children> <children>
@@ -19779,6 +19800,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>ded_note</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node> <concept_node>
<name>ded_status</name> <name>ded_status</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>

View File

@@ -56,6 +56,13 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
<Form.Item label={t("jobs.fields.ded_amt")} name="ded_amt"> <Form.Item label={t("jobs.fields.ded_amt")} name="ded_amt">
<CurrencyInput disabled={jobRO} min={0} /> <CurrencyInput disabled={jobRO} min={0} />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ded_note")} name="ded_note">
<Select disabled={jobRO}>
{bodyshop.md_ded_notes.map((n, index) => (
<Select.Option key={index}>{n}</Select.Option>
))}
</Select>
</Form.Item>
<Form.Item label={t("jobs.fields.policy_no")} name="policy_no"> <Form.Item label={t("jobs.fields.policy_no")} name="policy_no">
<Input disabled={jobRO} /> <Input disabled={jobRO} />
</Form.Item> </Form.Item>

View File

@@ -474,6 +474,19 @@ export default function ShopInfoGeneral({ form }) {
> >
<Switch /> <Switch />
</Form.Item> </Form.Item>
<Form.Item
name={["md_ded_notes"]}
label={t("bodyshop.fields.md_ded_notes")}
rules={[
{
required: true,
//message: t("general.validation.required"),
type: "array",
},
]}
>
<Select mode="tags" />
</Form.Item>
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow grow header={t("bodyshop.labels.messagingpresets")}> <LayoutFormRow grow header={t("bodyshop.labels.messagingpresets")}>
<Form.List name={["md_messaging_presets"]}> <Form.List name={["md_messaging_presets"]}>

View File

@@ -4,7 +4,6 @@ import React, { useState } from "react";
import { ChromePicker } from "react-color"; import { ChromePicker } from "react-color";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import styled from "styled-components"; import styled from "styled-components";
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component";
const SelectorDiv = styled.div` const SelectorDiv = styled.div`

View File

@@ -95,6 +95,7 @@ export const QUERY_BODYSHOP = gql`
tt_allow_post_to_invoiced tt_allow_post_to_invoiced
cdk_configuration cdk_configuration
md_estimators md_estimators
md_ded_notes
employees { employees {
id id
active active
@@ -186,6 +187,7 @@ export const UPDATE_SHOP = gql`
tt_allow_post_to_invoiced tt_allow_post_to_invoiced
cdk_configuration cdk_configuration
md_estimators md_estimators
md_ded_notes
employees { employees {
id id
first_name first_name

View File

@@ -464,6 +464,7 @@ export const GET_JOB_BY_PK = gql`
production_vars production_vars
ca_gst_registrant ca_gst_registrant
ownerid ownerid
ded_note
owner { owner {
id id
ownr_fn ownr_fn

View File

@@ -270,6 +270,7 @@
"md_categories": "Categories", "md_categories": "Categories",
"md_ccc_rates": "Courtesy Car Contract Rate Presets", "md_ccc_rates": "Courtesy Car Contract Rate Presets",
"md_classes": "Classes", "md_classes": "Classes",
"md_ded_notes": "Deductible Notes",
"md_hour_split": { "md_hour_split": {
"paint": "Paint Hour Split", "paint": "Paint Hour Split",
"prep": "Prep Hour Split" "prep": "Prep Hour Split"
@@ -1207,6 +1208,7 @@
"date_open": "Open", "date_open": "Open",
"date_scheduled": "Scheduled", "date_scheduled": "Scheduled",
"ded_amt": "Deductible", "ded_amt": "Deductible",
"ded_note": "Deductible Note",
"ded_status": "Deductible Status", "ded_status": "Deductible Status",
"depreciation_taxes": "Depreciation/Taxes", "depreciation_taxes": "Depreciation/Taxes",
"dms": { "dms": {

View File

@@ -270,6 +270,7 @@
"md_categories": "", "md_categories": "",
"md_ccc_rates": "", "md_ccc_rates": "",
"md_classes": "", "md_classes": "",
"md_ded_notes": "",
"md_hour_split": { "md_hour_split": {
"paint": "", "paint": "",
"prep": "" "prep": ""
@@ -1207,6 +1208,7 @@
"date_open": "Abierto", "date_open": "Abierto",
"date_scheduled": "Programado", "date_scheduled": "Programado",
"ded_amt": "Deducible", "ded_amt": "Deducible",
"ded_note": "",
"ded_status": "Estado deducible", "ded_status": "Estado deducible",
"depreciation_taxes": "Depreciación / Impuestos", "depreciation_taxes": "Depreciación / Impuestos",
"dms": { "dms": {

View File

@@ -270,6 +270,7 @@
"md_categories": "", "md_categories": "",
"md_ccc_rates": "", "md_ccc_rates": "",
"md_classes": "", "md_classes": "",
"md_ded_notes": "",
"md_hour_split": { "md_hour_split": {
"paint": "", "paint": "",
"prep": "" "prep": ""
@@ -1207,6 +1208,7 @@
"date_open": "Ouvrir", "date_open": "Ouvrir",
"date_scheduled": "Prévu", "date_scheduled": "Prévu",
"ded_amt": "Déductible", "ded_amt": "Déductible",
"ded_note": "",
"ded_status": "Statut de franchise", "ded_status": "Statut de franchise",
"depreciation_taxes": "Amortissement / taxes", "depreciation_taxes": "Amortissement / taxes",
"dms": { "dms": {

View File

@@ -824,6 +824,7 @@
- md_categories - md_categories
- md_ccc_rates - md_ccc_rates
- md_classes - md_classes
- md_ded_notes
- md_estimators - md_estimators
- md_hour_split - md_hour_split
- md_ins_cos - md_ins_cos
@@ -901,6 +902,7 @@
- md_categories - md_categories
- md_ccc_rates - md_ccc_rates
- md_classes - md_classes
- md_ded_notes
- md_estimators - md_estimators
- md_hour_split - md_hour_split
- md_ins_cos - md_ins_cos
@@ -2589,6 +2591,7 @@
- date_open - date_open
- date_scheduled - date_scheduled
- ded_amt - ded_amt
- ded_note
- ded_status - ded_status
- deliverchecklist - deliverchecklist
- depreciation_taxes - depreciation_taxes
@@ -2839,6 +2842,7 @@
- date_open - date_open
- date_scheduled - date_scheduled
- ded_amt - ded_amt
- ded_note
- ded_status - ded_status
- deliverchecklist - deliverchecklist
- depreciation_taxes - depreciation_taxes
@@ -3099,6 +3103,7 @@
- date_open - date_open
- date_scheduled - date_scheduled
- ded_amt - ded_amt
- ded_note
- ded_status - ded_status
- deliverchecklist - deliverchecklist
- depreciation_taxes - depreciation_taxes

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 "ded_note" text
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."jobs" add column "ded_note" text
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"."bodyshops" add column "md_ded_notes" jsonb
-- null default jsonb_build_array();

View File

@@ -0,0 +1,2 @@
alter table "public"."bodyshops" add column "md_ded_notes" jsonb
null default jsonb_build_array();