@@ -97,7 +97,7 @@ export function JobsDetailRates({ jobRO, form, job, bodyshop }) {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
nostyle
|
noStyle
|
||||||
shouldUpdate={(prev, cur) => prev.auto_add_ats !== cur.auto_add_ats}
|
shouldUpdate={(prev, cur) => prev.auto_add_ats !== cur.auto_add_ats}
|
||||||
>
|
>
|
||||||
{() => {
|
{() => {
|
||||||
|
|||||||
@@ -163,19 +163,44 @@ export async function RenderTemplates(
|
|||||||
: "50px",
|
: "50px",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
pdfOperations: templateAndData.map((template) => {
|
pdfOperations: [
|
||||||
return {
|
{
|
||||||
template: {
|
template: {
|
||||||
name: template.useShopSpecificTemplate
|
name: "/components/Header-Footer",
|
||||||
? `/${bodyshop.imexshopid}/${template.templateObject.name}`
|
recipe: "chrome-pdf",
|
||||||
: `/${template.templateObject.name}`,
|
engine: "handlebars",
|
||||||
...(renderAsHtml ? {} : { recipe: "chrome-pdf" }),
|
|
||||||
},
|
},
|
||||||
type: "append",
|
type: "merge",
|
||||||
mergeWholeDocument: true,
|
},
|
||||||
renderForEveryPage: true,
|
...templateAndData.map((template) => {
|
||||||
};
|
return {
|
||||||
}),
|
template: {
|
||||||
|
chrome: {
|
||||||
|
marginTop:
|
||||||
|
bodyshop.logo_img_path &&
|
||||||
|
bodyshop.logo_img_path.headerMargin &&
|
||||||
|
bodyshop.logo_img_path.headerMargin > 36
|
||||||
|
? bodyshop.logo_img_path.headerMargin
|
||||||
|
: "36px",
|
||||||
|
marginBottom:
|
||||||
|
bodyshop.logo_img_path &&
|
||||||
|
bodyshop.logo_img_path.footerMargin &&
|
||||||
|
bodyshop.logo_img_path.footerMargin > 50
|
||||||
|
? bodyshop.logo_img_path.footerMargin
|
||||||
|
: "50px",
|
||||||
|
},
|
||||||
|
name: template.useShopSpecificTemplate
|
||||||
|
? `/${bodyshop.imexshopid}/${template.templateObject.name}`
|
||||||
|
: `/${template.templateObject.name}`,
|
||||||
|
...(renderAsHtml ? {} : { recipe: "chrome-pdf" }),
|
||||||
|
},
|
||||||
|
type: "append",
|
||||||
|
|
||||||
|
// mergeWholeDocument: true,
|
||||||
|
// renderForEveryPage: true,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
...extend(
|
...extend(
|
||||||
|
|||||||
10
hasura/migrations/1650656410107_run_sql_migration/down.sql
Normal file
10
hasura/migrations/1650656410107_run_sql_migration/down.sql
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE OR REPLACE VIEW "public"."joblines_status" AS
|
||||||
|
-- SELECT j.jobid,
|
||||||
|
-- j.status,
|
||||||
|
-- count(1) AS count,
|
||||||
|
-- j.part_type
|
||||||
|
-- FROM joblines j
|
||||||
|
-- WHERE ((j.part_type IS NOT NULL) AND (j.part_type <> 'PAE'::text) AND (j.removed IS false))
|
||||||
|
-- GROUP BY j.jobid, j.status, j.part_type;
|
||||||
8
hasura/migrations/1650656410107_run_sql_migration/up.sql
Normal file
8
hasura/migrations/1650656410107_run_sql_migration/up.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
CREATE OR REPLACE VIEW "public"."joblines_status" AS
|
||||||
|
SELECT j.jobid,
|
||||||
|
j.status,
|
||||||
|
count(1) AS count,
|
||||||
|
j.part_type
|
||||||
|
FROM joblines j
|
||||||
|
WHERE ((j.part_type IS NOT NULL) AND (j.part_type <> 'PAE'::text) AND (j.removed IS false))
|
||||||
|
GROUP BY j.jobid, j.status, j.part_type;
|
||||||
10
hasura/migrations/1650656455358_run_sql_migration/down.sql
Normal file
10
hasura/migrations/1650656455358_run_sql_migration/down.sql
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE OR REPLACE VIEW "public"."joblines_status" AS
|
||||||
|
-- SELECT j.jobid,
|
||||||
|
-- j.status,
|
||||||
|
-- count(1) AS count,
|
||||||
|
-- j.part_type
|
||||||
|
-- FROM joblines j
|
||||||
|
-- WHERE ((j.part_type IS NOT NULL) AND (j.part_type <> 'PAE'::text) AND (j.removed IS false))
|
||||||
|
-- GROUP BY j.jobid, j.status, j.part_type;
|
||||||
8
hasura/migrations/1650656455358_run_sql_migration/up.sql
Normal file
8
hasura/migrations/1650656455358_run_sql_migration/up.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
CREATE OR REPLACE VIEW "public"."joblines_status" AS
|
||||||
|
SELECT j.jobid,
|
||||||
|
j.status,
|
||||||
|
count(1) AS count,
|
||||||
|
j.part_type
|
||||||
|
FROM joblines j
|
||||||
|
WHERE ((j.part_type IS NOT NULL) AND (j.part_type <> 'PAE'::text) AND (j.removed IS false))
|
||||||
|
GROUP BY j.jobid, j.status, j.part_type;
|
||||||
Reference in New Issue
Block a user