IO-2086 Resolve additional gallery import issue & tech login issue.

This commit is contained in:
Patrick Fic
2023-04-05 17:22:18 -07:00
parent 58defad2ea
commit 146bf95e51
2 changed files with 4 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import React, { useEffect } from "react"; import React, { useEffect } from "react";
import Gallery from "react-grid-gallery"; import { Gallery } from "react-grid-gallery";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
@@ -38,7 +38,7 @@ function JobDocumentsLocalGalleryExternal({
const { t } = useTranslation(); const { t } = useTranslation();
useEffect(() => { useEffect(() => {
if ( jobId) { if (jobId) {
getJobMedia(jobId); getJobMedia(jobId);
} }
}, [jobId, getJobMedia]); }, [jobId, getJobMedia]);
@@ -65,8 +65,7 @@ function JobDocumentsLocalGalleryExternal({
<div className="clearfix"> <div className="clearfix">
<Gallery <Gallery
images={galleryImages} images={galleryImages}
backdropClosesModal={true} onSelect={(index, image) => {
onSelectImage={(index, image) => {
setgalleryImages( setgalleryImages(
galleryImages.map((g, idx) => galleryImages.map((g, idx) =>
index === idx ? { ...g, isSelected: !g.isSelected } : g index === idx ? { ...g, isSelected: !g.isSelected } : g

View File

@@ -59,7 +59,7 @@ export function TechClockOffButton({
emps && emps &&
emps.rates.filter((r) => r.cost_center === values.cost_center)[0] emps.rates.filter((r) => r.cost_center === values.cost_center)[0]
?.rate, ?.rate,
flat_rate: emps.flat_rate, flat_rate: emps && emps.flat_rate,
ciecacode: ciecacode:
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? values.cost_center ? values.cost_center