Merged in feature/2021-06-18 (pull request #107)

Feature/2021 06 18
This commit is contained in:
Patrick Fic
2021-06-14 17:48:14 +00:00
11 changed files with 25 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
<babeledit_project version="1.2" be_version="2.7.1">
<babeledit_project be_version="2.7.1" version="1.2">
<!--
BabelEdit project file

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (20200629.0846)
-->
<!-- Title: G Pages: 1 -->
<svg width="43pt" height="43pt"
viewBox="0.00 0.00 43.20 43.20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(21.6 21.6)">
<title>G</title>
<polygon fill="#111111" stroke="transparent" points="-21.6,21.6 -21.6,-21.6 21.6,-21.6 21.6,21.6 -21.6,21.6"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 613 B

View File

@@ -17,7 +17,7 @@ export function PartsReceiveModalComponent({ bodyshop, form }) {
return (
<div>
<Form.Item name="fleet" label={t("courtesycars.fields.fleetnumber")}>
<Form.Item name="plate" label={t("courtesycars.fields.plate")}>
<Input />
</Form.Item>
<Form.Item

View File

@@ -44,8 +44,8 @@ export function ContractsFindModalContainer({
callSearch({
variables: {
fleet:
(values.fleet && values.fleet !== "" && values.fleet) || undefined,
plate:
(values.plate && values.plate !== "" && values.plate) || undefined,
time: values.time,
},
});

View File

@@ -90,13 +90,12 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
// sorter: (a, b) => alphaSort(a.model, b.model),
sortOrder:
state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
render: (text, record) => (
<div>
{record.cccontracts.length === 1
? record.cccontracts[0].job.ro_number
: null}
</div>
),
render: (text, record) =>
record.cccontracts.length === 1 ? (
<Link to={`/manage/jobs/${record.cccontracts[0].job.id}`}>
{record.cccontracts[0].job.ro_number}
</Link>
) : null,
},
];

View File

@@ -132,9 +132,13 @@ export const uploadToCloudinary = async (
//Insert the document with the matching key.
let takenat;
if (fileType.includes("image")) {
const exif = await exifr.parse(file);
try {
const exif = await exifr.parse(file);
takenat = exif && exif.DateTimeOriginal;
takenat = exif && exif.DateTimeOriginal;
} catch (error) {
console.log("Unable to parse image file for EXIF Data");
}
}
const documentInsert = await client.mutate({
mutation: INSERT_NEW_DOCUMENT,

View File

@@ -37,7 +37,7 @@ export default function JobsDocumentsDeleteButton({
}),
});
} else {
successfulDeletes.push(key);
successfulDeletes.push(key.replace(/\.[^/.]+$/, ""));
}
});
});

View File

@@ -139,7 +139,7 @@ export function PartsOrderListTableComponent({
</Button>
</Popconfirm>
<Button
disabled={jobRO}
disabled={jobRO ? !record.return : jobRO}
onClick={() => {
logImEXEvent("parts_order_receive_bill");

View File

@@ -191,7 +191,7 @@ export const QUERY_ACTIVE_CONTRACTS_PAGINATED = gql`
`;
export const FIND_CONTRACT = gql`
query FIND_CONTRACT($fleet: String, $time: timestamptz!) {
query FIND_CONTRACT($plate: String, $time: timestamptz!) {
cccontracts(
where: {
_or: [
@@ -199,7 +199,7 @@ export const FIND_CONTRACT = gql`
{ actualreturn: { _is_null: true } }
]
start: { _lte: $time }
courtesycar: { fleetnumber: { _eq: $fleet } }
courtesycar: { plate: { _eq: $plate } }
}
) {
agreementnumber

View File

@@ -156,7 +156,7 @@
"markforreexport": "Mark for Re-export",
"new": "New Bill",
"noneselected": "No bill selected.",
"onlycmforinvoiced": "Only credit memos can be entered for any job that has been invoiced.",
"onlycmforinvoiced": "Only credit memos can be entered for any job that has been invoiced, exported, or voided.",
"retailtotal": "Bills Retail Total",
"state_tax": "Provincial/State Tax",
"subtotal": "Subtotal",
@@ -165,7 +165,7 @@
"successes": {
"created": "Invoice added successfully.",
"deleted": "Bill deleted successfully.",
"exported": "Bill exported successfully."
"exported": "Bill(s) exported successfully."
},
"validation": {
"manualinhouse": "Manual posting to the in house vendor is restricted. ",
@@ -1389,7 +1389,7 @@
"delete": "Job deleted successfully.",
"deleted": "Job deleted successfully.",
"duplicated": "Job duplicated successfully. ",
"exported": "Job exported successfully. ",
"exported": "Job(s) exported successfully. ",
"invoiced": "Job closed and invoiced successfully.",
"partsqueue": "Job added to parts queue.",
"save": "Job saved successfully.",
@@ -1663,7 +1663,7 @@
"totalpayments": "Total Payments"
},
"successes": {
"exported": "Payment exported successfully.",
"exported": "Payment(s) exported successfully.",
"payment": "Payment created successfully. ",
"stripe": "Credit card transaction charged successfully."
}

View File

@@ -60,7 +60,7 @@ exports.deleteFiles = async (req, res) => {
//delete images returns.push(
returns.push(
await cloudinary.api.delete_resources(
types.raw.map((x) => x.key),
types.raw.map((x) => `${x.key}.${x.extension}`),
{ resource_type: "raw" }
)
);