IO-2123 Add cc inventory print.
This commit is contained in:
@@ -36519,6 +36519,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>courtesy_car_inventory</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>courtesy_car_terms</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import { SyncOutlined, WarningFilled } from "@ant-design/icons";
|
||||
import { Button, Card, Input, Space, Table, Tooltip } from "antd";
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Dropdown,
|
||||
Input,
|
||||
Menu,
|
||||
Space,
|
||||
Table,
|
||||
Tooltip,
|
||||
} from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link } from "react-router-dom";
|
||||
@@ -7,6 +16,8 @@ import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
|
||||
import moment from "moment";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
||||
const [state, setState] = useState({
|
||||
sortedInfo: {},
|
||||
@@ -166,6 +177,32 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
||||
<Button onClick={() => refetch()}>
|
||||
<SyncOutlined />
|
||||
</Button>
|
||||
<Dropdown
|
||||
trigger="click"
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item
|
||||
onClick={() =>
|
||||
GenerateDocument(
|
||||
{
|
||||
name: TemplateList("courtesycar").courtesy_car_inventory
|
||||
.key,
|
||||
variables: {
|
||||
//id: contract.id
|
||||
},
|
||||
},
|
||||
{},
|
||||
"p"
|
||||
)
|
||||
}
|
||||
>
|
||||
{t("printcenter.courtesycarcontract.courtesy_car_inventory")}
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
<Button>{t("general.labels.print")}</Button>
|
||||
</Dropdown>
|
||||
<Link to={`/manage/courtesycars/new`}>
|
||||
<Button>{t("courtesycars.actions.new")}</Button>
|
||||
</Link>
|
||||
|
||||
@@ -2168,6 +2168,7 @@
|
||||
"courtesycarcontract": {
|
||||
"courtesy_car_contract": "Courtesy Car Contract",
|
||||
"courtesy_car_impound": "Impound Charges",
|
||||
"courtesy_car_inventory": "Courtesy Car Inventory",
|
||||
"courtesy_car_terms": "Courtesy Car Terms"
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -2168,6 +2168,7 @@
|
||||
"courtesycarcontract": {
|
||||
"courtesy_car_contract": "",
|
||||
"courtesy_car_impound": "",
|
||||
"courtesy_car_inventory": "",
|
||||
"courtesy_car_terms": ""
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -2168,6 +2168,7 @@
|
||||
"courtesycarcontract": {
|
||||
"courtesy_car_contract": "",
|
||||
"courtesy_car_impound": "",
|
||||
"courtesy_car_inventory": "",
|
||||
"courtesy_car_terms": ""
|
||||
},
|
||||
"errors": {
|
||||
|
||||
@@ -1739,6 +1739,21 @@ export const TemplateList = (type, context) => {
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...(!type || type === "courtesycar"
|
||||
? {
|
||||
courtesy_car_inventory: {
|
||||
title: i18n.t(
|
||||
"printcenter.courtesycarcontract.courtesy_car_inventory"
|
||||
),
|
||||
description: "Est Detail",
|
||||
subject: i18n.t(
|
||||
"printcenter.courtesycarcontract.courtesy_car_inventory"
|
||||
),
|
||||
key: "courtesy_car_inventory",
|
||||
disabled: false,
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...(!type || type === "bill"
|
||||
? {
|
||||
inhouse_invoice: {
|
||||
|
||||
Reference in New Issue
Block a user