From a630fc555604c1e48538aec531e4f0ee4d7fbc89 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 11 Dec 2024 09:07:52 -0800 Subject: [PATCH 1/2] IO-3020 IO-3036 Update git attributes file. --- .gitattributes | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/.gitattributes b/.gitattributes index fcadb2cf9..5edcd3695 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,80 @@ +# Ensure all text files use LF for line endings * text eol=lf + +# Binary files should not be modified by Git +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.webp binary +*.svg binary + +# Fonts +*.woff binary +*.woff2 binary +*.ttf binary +*.otf binary +*.eot binary + +# Videos +*.mp4 binary +*.mov binary +*.avi binary +*.mkv binary +*.webm binary + +# Audio +*.mp3 binary +*.wav binary +*.ogg binary +*.flac binary + +# Archives and compressed files +*.zip binary +*.gz binary +*.tar binary +*.7z binary +*.rar binary + +# PDF and documents +*.pdf binary +*.doc binary +*.docx binary +*.xls binary +*.xlsx binary +*.ppt binary +*.pptx binary + +# Exclude JSON and other data files from text processing, if necessary +*.json text +*.xml text +*.csv text + +# Scripts and code files should maintain LF endings +*.js text eol=lf +*.jsx text eol=lf +*.ts text eol=lf +*.tsx text eol=lf +*.css text eol=lf +*.scss text eol=lf +*.html text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.md text eol=lf +*.sh text eol=lf +*.py text eol=lf +*.rb text eol=lf +*.java text eol=lf +*.php text eol=lf + +# Git configuration files +.gitattributes text eol=lf +.gitignore text eol=lf +*.gitattributes text eol=lf + +# Exclude some other potential binary files +*.db binary +*.sqlite binary +*.exe binary +*.dll binary From 53d15b0d455eb5563195419ff09d827c9cc4e159 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 11 Dec 2024 09:44:18 -0800 Subject: [PATCH 2/2] IO-3020 IO-3036 Resolve identified bugs. --- .../job-detail-cards.component.jsx | 2 +- .../job-detail-cards.documents.component.jsx | 21 +- .../jobs-detail-header-actions.component.jsx | 16 +- .../jobs-documents-gallery.component.jsx | 2 +- ...jobs-documents-local-gallery.container.jsx | 201 ++++++++++-------- .../shop-intellipay-config.component.jsx | 2 +- .../jobs-checklist-view.page.jsx | 77 ++++--- 7 files changed, 179 insertions(+), 142 deletions(-) diff --git a/client/src/components/job-detail-cards/job-detail-cards.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.component.jsx index 8374dec90..204c956db 100644 --- a/client/src/components/job-detail-cards/job-detail-cards.component.jsx +++ b/client/src/components/job-detail-cards/job-detail-cards.component.jsx @@ -47,7 +47,7 @@ export function JobDetailCards({ bodyshop, setPrintCenterContext }) { md: "100%", lg: "75%", xl: "75%", - xxl: "60%" + xxl: "75%" }; const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%"; diff --git a/client/src/components/job-detail-cards/job-detail-cards.documents.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.documents.component.jsx index 88ebfdde7..3129eaab7 100644 --- a/client/src/components/job-detail-cards/job-detail-cards.documents.component.jsx +++ b/client/src/components/job-detail-cards/job-detail-cards.documents.component.jsx @@ -3,6 +3,7 @@ import React from "react"; import { useTranslation } from "react-i18next"; import { GenerateThumbUrl } from "../jobs-documents-gallery/job-documents.utility"; import CardTemplate from "./job-detail-cards.template.component"; +import UpsellComponent, { upsellEnum } from "../upsell/upsell.component"; export default function JobDetailCardsDocumentsComponent({ loading, data }) { const { t } = useTranslation(); @@ -20,15 +21,17 @@ export default function JobDetailCardsDocumentsComponent({ loading, data }) { title={t("jobs.labels.cards.documents")} extraLink={`/manage/jobs/${data.id}?tab=documents`} > - {data.documents.length > 0 ? ( - - {data.documents.map((item) => ( - {item.name} - ))} - - ) : ( -
{t("documents.errors.nodocuments")}
- )} + + {data.documents.length > 0 ? ( + + {data.documents.map((item) => ( + {item.name} + ))} + + ) : ( +
{t("documents.errors.nodocuments")}
+ )} +
); } diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx index e3b19eac4..89e0efa43 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx @@ -892,16 +892,16 @@ export function JobsDetailHeaderActions({ key: "postbills", id: "job-actions-postbills", disabled: !job.converted, - label: {t("jobs.actions.postbills")}, + label: {t("jobs.actions.postbills")}, onClick: () => { logImEXEvent("job_header_enter_bills"); - - setBillEnterContext({ - actions: { refetch: refetch }, - context: { - job: job - } - }); + HasFeatureAccess({ featureName: "bills", bodyshop }) && + setBillEnterContext({ + actions: { refetch: refetch }, + context: { + job: job + } + }); } }, diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx index ae9f367ae..0dcc18855 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx @@ -133,7 +133,7 @@ function JobsDocumentsComponent({ {!hasMediaAccess && ( - + )} diff --git a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx index 4c0fe9f00..8c6991d94 100644 --- a/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx +++ b/client/src/components/jobs-documents-local-gallery/jobs-documents-local-gallery.container.jsx @@ -1,5 +1,5 @@ import { FileExcelFilled, SyncOutlined } from "@ant-design/icons"; -import { Alert, Button, Card, Space } from "antd"; +import { Alert, Button, Card, Col, Row, Space } from "antd"; import React, { useEffect, useState } from "react"; import { Gallery } from "react-grid-gallery"; import { useTranslation } from "react-i18next"; @@ -18,6 +18,7 @@ import JobsDocumentsLocalGallerySelectAllComponent from "./jobs-documents-local- import Lightbox from "react-image-lightbox"; import "react-image-lightbox/style.css"; import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component"; +import UpsellComponent, { upsellEnum } from "../upsell/upsell.component"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -88,95 +89,117 @@ export function JobsDocumentsLocalGallery({ const hasMediaAccess = HasFeatureAccess({ bodyshop, featureName: "media" }); return (
- - - - - - - - - - - - - - - { - toggleMediaSelected({ jobid: job.id, filename: image.filename }); - }} - {...(optimized && { - customControls: [ - - ] - })} - onClick={(index) => { - setModalState({ open: true, index: index }); - // const media = allMedia[job.id].find( - // (m) => m.optimized === item.src - // ); + + + + + + + + + + + + + + {!hasMediaAccess && ( + + + + + + )} + + + + + + + + { + toggleMediaSelected({ jobid: job.id, filename: image.filename }); + }} + {...(optimized && { + customControls: [ + + ] + })} + onClick={(index) => { + setModalState({ open: true, index: index }); + // const media = allMedia[job.id].find( + // (m) => m.optimized === item.src + // ); - // window.open( - // media ? media.fullsize : item.fullsize, - // "_blank", - // "toolbar=0,location=0,menubar=0" - // ); - }} - /> - - - { - return { - backgroundImage: , - height: "100%", - width: "100%", - cursor: "pointer" - }; - }} - onClick={(index) => { - window.open(jobMedia.other[index].fullsize, "_blank", "toolbar=0,location=0,menubar=0"); - }} - onSelect={(index, image) => { - toggleMediaSelected({ jobid: job.id, filename: image.filename }); - }} - /> - - {modalState.open && ( - setModalState({ open: false, index: 0 })} - onMovePrevRequest={() => - setModalState({ - ...modalState, - index: (modalState.index + jobMedia.images.length - 1) % jobMedia.images.length - }) - } - onMoveNextRequest={() => - setModalState({ - ...modalState, - index: (modalState.index + 1) % jobMedia.images.length - }) - } - /> - )} + // window.open( + // media ? media.fullsize : item.fullsize, + // "_blank", + // "toolbar=0,location=0,menubar=0" + // ); + }} + /> + + + + + { + return { + backgroundImage: , + height: "100%", + width: "100%", + cursor: "pointer" + }; + }} + onClick={(index) => { + window.open(jobMedia.other[index].fullsize, "_blank", "toolbar=0,location=0,menubar=0"); + }} + onSelect={(index, image) => { + toggleMediaSelected({ jobid: job.id, filename: image.filename }); + }} + /> + + + {modalState.open && ( + setModalState({ open: false, index: 0 })} + onMovePrevRequest={() => + setModalState({ + ...modalState, + index: (modalState.index + jobMedia.images.length - 1) % jobMedia.images.length + }) + } + onMoveNextRequest={() => + setModalState({ + ...modalState, + index: (modalState.index + 1) % jobMedia.images.length + }) + } + /> + )} +
); } diff --git a/client/src/components/shop-info/shop-intellipay-config.component.jsx b/client/src/components/shop-info/shop-intellipay-config.component.jsx index 30c12cfa2..526adbe2a 100644 --- a/client/src/components/shop-info/shop-intellipay-config.component.jsx +++ b/client/src/components/shop-info/shop-intellipay-config.component.jsx @@ -1,4 +1,4 @@ -import { Alert, Form, InputNumber, Switch } from "antd"; +import { Alert, Form, Switch } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; diff --git a/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx b/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx index c9eda5480..cc6bf193f 100644 --- a/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx +++ b/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import { Col, Row, Typography } from "antd"; +import { Card, Col, Row, Typography } from "antd"; import dayjs from "../../utils/day"; import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; @@ -14,6 +14,8 @@ import { QUERY_JOB_CHECKLISTS } from "../../graphql/jobs.queries"; import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions"; import { selectBodyshop } from "../../redux/user/user.selectors"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; +import FeatureWrapperComponent from "../../components/feature-wrapper/feature-wrapper.component"; +import UpsellComponent, { upsellEnum } from "../../components/upsell/upsell.component"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser @@ -73,38 +75,47 @@ export function JobsChecklistViewContainer({ bodyshop, setBreadcrumbs, setSelect ); return ( - - - - {t("jobs.labels.intakechecklist")} - {data.jobs_by_pk.intakechecklist && data.jobs_by_pk.intakechecklist.form && ( - <> - - - - )} - - - {t("jobs.labels.deliverchecklist")} - {data.jobs_by_pk.deliverchecklist && data.jobs_by_pk.deliverchecklist.form && ( - <> - - - - )} - - - + + + + } + > + + + + {t("jobs.labels.intakechecklist")} + {data.jobs_by_pk.intakechecklist && data.jobs_by_pk.intakechecklist.form && ( + <> + + + + )} + + + {t("jobs.labels.deliverchecklist")} + {data.jobs_by_pk.deliverchecklist && data.jobs_by_pk.deliverchecklist.form && ( + <> + + + + )} + + + + ); }