3
.gitignore
vendored
3
.gitignore
vendored
@@ -113,3 +113,6 @@ firebase/.env
|
||||
!.elasticbeanstalk/*.cfg.yml
|
||||
!.elasticbeanstalk/*.global.yml
|
||||
logs/oAuthClient-log.log
|
||||
|
||||
|
||||
.node-persist/**
|
||||
@@ -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
|
||||
@@ -37159,6 +37159,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>parts_label_multiple</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>parts_label_single</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -2,6 +2,8 @@ import cleanAxios from "../../utils/CleanAxios";
|
||||
import { store } from "../../redux/store";
|
||||
import { addMediaForJob } from "../../redux/media/media.actions";
|
||||
import normalizeUrl from "normalize-url";
|
||||
import { notification } from "antd";
|
||||
import i18n from "i18next";
|
||||
|
||||
export const handleUpload = async ({ ev, context }) => {
|
||||
const { onError, onSuccess, onProgress, file } = ev;
|
||||
@@ -45,6 +47,11 @@ export const handleUpload = async ({ ev, context }) => {
|
||||
}
|
||||
} else {
|
||||
onSuccess && onSuccess(file);
|
||||
notification.open({
|
||||
type: "success",
|
||||
key: "docuploadsuccess",
|
||||
message: i18n.t("documents.successes.insert"),
|
||||
});
|
||||
store.dispatch(
|
||||
addMediaForJob({
|
||||
jobid,
|
||||
|
||||
@@ -14,6 +14,7 @@ import { selectAllMedia } from "../../redux/media/media.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { CreateExplorerLinkForJob } from "../../utils/localmedia";
|
||||
import DocumentsLocalUploadComponent from "../documents-local-upload/documents-local-upload.component";
|
||||
import JobsDocumentsLocalDeleteButton from "./jobs-documents-local-gallery.delete.component";
|
||||
import JobsLocalGalleryDownloadButton from "./jobs-documents-local-gallery.download";
|
||||
import JobsDocumentsLocalGalleryReassign from "./jobs-documents-local-gallery.reassign.component";
|
||||
import JobsDocumentsLocalGallerySelectAllComponent from "./jobs-documents-local-gallery.selectall.component";
|
||||
@@ -101,6 +102,7 @@ export function JobsDocumentsLocalGallery({
|
||||
<JobsDocumentsLocalGalleryReassign jobid={job.id} />
|
||||
<JobsDocumentsLocalGallerySelectAllComponent jobid={job.id} />
|
||||
<JobsLocalGalleryDownloadButton job={job} />
|
||||
<JobsDocumentsLocalDeleteButton jobid={job.id} />
|
||||
</Space>
|
||||
<Card>
|
||||
<DocumentsLocalUploadComponent
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
import { QuestionCircleOutlined } from "@ant-design/icons";
|
||||
import { Button, notification, Popconfirm } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import cleanAxios from "../../utils/CleanAxios";
|
||||
//Context: currentUserEmail, bodyshop, jobid, invoiceid
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { getJobMedia } from "../../redux/media/media.actions";
|
||||
import { selectAllMedia } from "../../redux/media/media.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
allMedia: selectAllMedia,
|
||||
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
getJobMedia: (id) => dispatch(getJobMedia(id)),
|
||||
});
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(JobsDocumentsLocalDeleteButton);
|
||||
|
||||
export function JobsDocumentsLocalDeleteButton({
|
||||
bodyshop,
|
||||
getJobMedia,
|
||||
allMedia,
|
||||
jobid,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const handleDelete = async () => {
|
||||
logImEXEvent("job_documents_delete");
|
||||
setLoading(true);
|
||||
|
||||
const delres = await cleanAxios.post(
|
||||
`${bodyshop.localmediaserverhttp}/jobs/delete`,
|
||||
{
|
||||
jobid: jobid,
|
||||
files: ((allMedia && allMedia[jobid]) || [])
|
||||
.filter((i) => i.isSelected)
|
||||
.map((i) => i.filename),
|
||||
},
|
||||
{ headers: { ims_token: bodyshop.localmediatoken } }
|
||||
);
|
||||
|
||||
if (delres.errors) {
|
||||
notification["error"]({
|
||||
message: t("documents.errors.deleting", {
|
||||
message: JSON.stringify(delres.errors),
|
||||
}),
|
||||
});
|
||||
} else {
|
||||
notification.open({
|
||||
key: "docdeletedsuccesfully",
|
||||
type: "success",
|
||||
message: t("documents.successes.delete"),
|
||||
});
|
||||
}
|
||||
getJobMedia(jobid);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<Popconfirm
|
||||
icon={<QuestionCircleOutlined style={{ color: "red" }} />}
|
||||
onConfirm={handleDelete}
|
||||
title={t("documents.labels.confirmdelete")}
|
||||
okText={t("general.actions.delete")}
|
||||
okButtonProps={{ type: "danger" }}
|
||||
cancelText={t("general.actions.cancel")}
|
||||
>
|
||||
<Button loading={loading}>{t("documents.actions.delete")}</Button>
|
||||
</Popconfirm>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Card, Form, InputNumber, Popover } from "antd";
|
||||
import { Button, Card, Form, InputNumber, Popover, Radio } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -24,7 +24,8 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
|
||||
const { t } = useTranslation();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleOk = () => {
|
||||
const handleOk = (e) => {
|
||||
e.stopPropagation();
|
||||
form.submit();
|
||||
setIsModalVisible(false);
|
||||
};
|
||||
@@ -33,12 +34,12 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
|
||||
setIsModalVisible(false);
|
||||
setLoading(false);
|
||||
};
|
||||
const handleFinish = async (values) => {
|
||||
const handleFinish = async ({ template, ...values }) => {
|
||||
const { sendtype, ...restVals } = values;
|
||||
setLoading(true);
|
||||
await GenerateDocument(
|
||||
{
|
||||
name: TemplateList("job_special").folder_label_multiple.key,
|
||||
name: TemplateList("job_special")[template].key,
|
||||
variables: { id: jobId },
|
||||
context: restVals,
|
||||
},
|
||||
@@ -48,6 +49,7 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
|
||||
);
|
||||
setLoading(false);
|
||||
setIsModalVisible(false);
|
||||
form.resetFields();
|
||||
};
|
||||
|
||||
const content = (
|
||||
@@ -58,13 +60,28 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
|
||||
layout="vertical"
|
||||
form={form}
|
||||
>
|
||||
<Form.Item required name="template">
|
||||
<Radio.Group>
|
||||
<Radio.Button value="parts_label_multiple">
|
||||
{t("printcenter.jobs.parts_label_multiple")}
|
||||
</Radio.Button>
|
||||
<Radio.Button value="folder_label_multiple">
|
||||
{t("printcenter.jobs.folder_label_multiple")}
|
||||
</Radio.Button>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
required
|
||||
label={t("printcenter.jobs.labels.position")}
|
||||
name="position"
|
||||
>
|
||||
<InputNumber min={1} precision={0} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("printcenter.jobs.labels.count")} name="count">
|
||||
<Form.Item
|
||||
required
|
||||
label={t("printcenter.jobs.labels.count")}
|
||||
name="count"
|
||||
>
|
||||
<InputNumber min={1} precision={0} max={99} />
|
||||
</Form.Item>
|
||||
<Button type="primary" loading={loading} onClick={handleOk}>
|
||||
|
||||
@@ -2181,7 +2181,7 @@
|
||||
"filing_coversheet_portrait": "Filing Coversheet (Portrait)",
|
||||
"final_invoice": "Final Invoice",
|
||||
"fippa_authorization": "FIPPA Authorization",
|
||||
"folder_label_multiple": "Folder Label Multiple",
|
||||
"folder_label_multiple": "Folder Label - Multi",
|
||||
"glass_express_checklist": "Glass Express Checklist",
|
||||
"guarantee": "Repair Guarantee",
|
||||
"individual_job_note": "Job Note RO # {{ro_number}}",
|
||||
@@ -2202,6 +2202,7 @@
|
||||
"mpi_eglass_auth": "MPI - eGlass Auth",
|
||||
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet",
|
||||
"paint_grid": "Paint Grid",
|
||||
"parts_label_multiple": "Parts Label - Multi",
|
||||
"parts_label_single": "Parts Label - Single",
|
||||
"parts_list": "Parts List",
|
||||
"parts_order": "Parts Order Confirmation",
|
||||
|
||||
@@ -2202,6 +2202,7 @@
|
||||
"mpi_eglass_auth": "",
|
||||
"mpi_final_acct_sheet": "",
|
||||
"paint_grid": "",
|
||||
"parts_label_multiple": "",
|
||||
"parts_label_single": "",
|
||||
"parts_list": "",
|
||||
"parts_order": "",
|
||||
|
||||
@@ -2202,6 +2202,7 @@
|
||||
"mpi_eglass_auth": "",
|
||||
"mpi_final_acct_sheet": "",
|
||||
"paint_grid": "",
|
||||
"parts_label_multiple": "",
|
||||
"parts_label_single": "",
|
||||
"parts_list": "",
|
||||
"parts_order": "",
|
||||
|
||||
@@ -504,6 +504,12 @@ export const TemplateList = (type, context) => {
|
||||
key: "folder_label_multiple",
|
||||
disabled: false,
|
||||
},
|
||||
parts_label_multiple: {
|
||||
title: i18n.t("printcenter.jobs.parts_label_multiple"),
|
||||
description: "Parts Label Multiple",
|
||||
key: "parts_label_multiple",
|
||||
disabled: false,
|
||||
},
|
||||
csi_invitation_action: {
|
||||
title: i18n.t("printcenter.jobs.csi_invitation_action"),
|
||||
description: "CSI invite",
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Must set the environment variables using:
|
||||
|
||||
firebase functions:config:set auth.graphql_endpoint="https://db.development.bodyshop.app/v1/graphql" auth.hasura_secret_admin_key="Dev-BodyShopApp!"
|
||||
firebase functions:config:set auth.graphql_endpoint="https://db.dev.bodyshop.app/v1/graphql" auth.hasura_secret_admin_key="Dev-BodyShopApp!"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
version: 2
|
||||
endpoint: https://db.development.bodyshop.app
|
||||
endpoint: https://db.dev.bodyshop.app
|
||||
admin_secret: Dev-BodyShopApp!
|
||||
metadata_directory: metadata
|
||||
actions:
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
- function:
|
||||
schema: public
|
||||
name: search_bills
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_cccontracts
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_dms_vehicles
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_exportlog
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_inventory
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_jobs
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_owners
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_payments
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_phonebook
|
||||
- function:
|
||||
schema: public
|
||||
- function:
|
||||
name: search_vehicles
|
||||
schema: public
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -41,6 +41,7 @@
|
||||
"moment-timezone": "^0.5.34",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"node-mailjet": "^5.1.0",
|
||||
"node-persist": "^3.1.0",
|
||||
"node-quickbooks": "^2.0.39",
|
||||
"nodemailer": "^6.7.7",
|
||||
"phone": "^3.1.23",
|
||||
|
||||
@@ -210,7 +210,7 @@ app.post("/qbo/payments", fb.validateFirebaseIdToken, qbo.payments);
|
||||
|
||||
var data = require("./server/data/data");
|
||||
app.post("/data/ah", data.autohouse);
|
||||
app.post("/data/arms", data.arms);
|
||||
app.post("/record-handler/arms", data.arms);
|
||||
|
||||
var taskHandler = require("./server/tasks/tasks");
|
||||
app.post("/taskHandler", taskHandler.taskHandler);
|
||||
@@ -238,6 +238,7 @@ app.get("/", async function (req, res) {
|
||||
res.status(200).send("Access Forbidden.");
|
||||
});
|
||||
|
||||
|
||||
server.listen(port, (error) => {
|
||||
if (error) throw error;
|
||||
logger.log(
|
||||
|
||||
1621
server/data/arms.js
1621
server/data/arms.js
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ const logger = new graylog2.graylog({
|
||||
});
|
||||
|
||||
function log(message, type, user, record, object) {
|
||||
if (type !== "ioevent" && type !== "DEBUG")
|
||||
if (type !== "ioevent")
|
||||
console.log(message, {
|
||||
type,
|
||||
env: process.env.NODE_ENV || "development",
|
||||
|
||||
@@ -2715,6 +2715,11 @@ node-mailjet@^5.1.0:
|
||||
json-bigint "^1.0.0"
|
||||
url-join "^4.0.0"
|
||||
|
||||
node-persist@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/node-persist/-/node-persist-3.1.0.tgz#9d4b03950bba70d37d13d3d3551840e25fd17e09"
|
||||
integrity sha512-/j+fd/u71wNgKf3V2bx4tnDm+3GvLnlCuvf2MXbJ3wern+67IAb6zN9Leu1tCWPlPNZ+v1hLSibVukkPK2HqJw==
|
||||
|
||||
node-quickbooks@^2.0.39:
|
||||
version "2.0.39"
|
||||
resolved "https://registry.yarnpkg.com/node-quickbooks/-/node-quickbooks-2.0.39.tgz#a2534d24063e8a0cea5bb80c66b0727c1c942081"
|
||||
|
||||
Reference in New Issue
Block a user