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>
</translations>
</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>
<name>md_hour_split</name>
<children>
@@ -19779,6 +19800,27 @@
</translation>
</translations>
</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>
<name>ded_status</name>
<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">
<CurrencyInput disabled={jobRO} min={0} />
</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">
<Input disabled={jobRO} />
</Form.Item>

View File

@@ -474,6 +474,19 @@ export default function ShopInfoGeneral({ form }) {
>
<Switch />
</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 grow header={t("bodyshop.labels.messagingpresets")}>
<Form.List name={["md_messaging_presets"]}>

View File

@@ -4,7 +4,6 @@ import React, { useState } from "react";
import { ChromePicker } from "react-color";
import { useTranslation } from "react-i18next";
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";
const SelectorDiv = styled.div`

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -824,6 +824,7 @@
- md_categories
- md_ccc_rates
- md_classes
- md_ded_notes
- md_estimators
- md_hour_split
- md_ins_cos
@@ -901,6 +902,7 @@
- md_categories
- md_ccc_rates
- md_classes
- md_ded_notes
- md_estimators
- md_hour_split
- md_ins_cos
@@ -2589,6 +2591,7 @@
- date_open
- date_scheduled
- ded_amt
- ded_note
- ded_status
- deliverchecklist
- depreciation_taxes
@@ -2839,6 +2842,7 @@
- date_open
- date_scheduled
- ded_amt
- ded_note
- ded_status
- deliverchecklist
- depreciation_taxes
@@ -3099,6 +3103,7 @@
- date_open
- date_scheduled
- ded_amt
- ded_note
- ded_status
- deliverchecklist
- 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();