Several random fixes + updates to pm2 script.

This commit is contained in:
Patrick Fic
2020-07-15 11:54:24 -07:00
parent bdd1f53ff9
commit bf74d9a042
8 changed files with 78 additions and 26 deletions

View File

@@ -47,3 +47,20 @@
line-height: 1rem;
}
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 0.2rem;
background-color: #f5f5f5;
}
::-webkit-scrollbar {
width: .25rem;
background-color: #f5f5f5;
}
::-webkit-scrollbar-thumb {
border-radius: 0.2rem;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #188fff;
}

View File

@@ -1,6 +1,6 @@
import Icon from "@ant-design/icons";
import { FaCheck, FaCheckDouble } from "react-icons/fa";
import React, { useEffect, useRef } from "react";
import { FaCheck, FaCheckDouble } from "react-icons/fa";
import {
AutoSizer,
CellMeasurer,
@@ -8,7 +8,6 @@ import {
List,
} from "react-virtualized";
import "./chat-message-list.styles.scss";
import { urlencoded } from "body-parser";
export default function ChatMessageListComponent({ messages }) {
const virtualizedListRef = useRef(null);
@@ -23,7 +22,7 @@ export default function ChatMessageListComponent({ messages }) {
//console.log("Scrolling to", messages.length);
// !!virtualizedListRef.current &&
// virtualizedListRef.current.scrollToRow(messages.length);
//TODO Outstanding isue on virtualization: https://github.com/bvaughn/react-virtualized/issues/1179
// Outstanding isue on virtualization: https://github.com/bvaughn/react-virtualized/issues/1179
//Scrolling does not work on this version of React.
};
@@ -75,7 +74,11 @@ const MessageRender = (message) => {
if (message.image) {
return (
<a href={message.image_path} target='__blank'>
<img className='message-img' src={message.image_path} />
<img
alt='Received'
className='message-img'
src={message.image_path}
/>
</a>
);
} else {

View File

@@ -101,11 +101,16 @@ export default function JobsCreateOwnerInfoNewComponent() {
message: "This is not a valid email address.",
},
]}
name={["owner", "data", "ownr_ea"]}>
<FormItemEmail
//TODO Fix this email={getFieldValue("ownr_ea")}
disabled={!state.owner.new}
/>
name={["owner", "data", "ownr_ea"]}
shouldUpdate>
{() => {
return (
<FormItemEmail
//email={form.getFieldValue("ownr_ea")}
disabled={!state.owner.new}
/>
);
}}
</Form.Item>
<Form.Item
label={t("owners.fields.ownr_ph1")}

View File

@@ -113,7 +113,7 @@ export function PartsOrderModalContainer({
vendorid: bodyshop.inhousevendorid,
jobid: jobId,
total: 0,
invoice_number: `${jobId}`, //TODO Add INhouse invoice generation?
invoice_number: `${jobId}`,
federal_tax_rate: bodyshop.invoice_tax_rates.federal_tax_rate || 0,
state_tax_rate: bodyshop.invoice_tax_rates.state_tax_rate || 0,
local_tax_rate: bodyshop.invoice_tax_rates.local_tax_rate || 0,
@@ -141,7 +141,6 @@ export function PartsOrderModalContainer({
toggleModalVisible();
if (sendType === "e") {
//TODO Remove hardcoding
setEmailOptions({
messageOptions: {
to: data.vendors.filter((item) => item.id === values.id)[0] || null,

View File

@@ -63,7 +63,6 @@ export function ScheduleJobModalContainer({
skip: !visible || !!!jobId,
});
//TODO Customize the amount of minutes it will add.
const handleOk = async () => {
setLoading(true);
if (!!previousEvent) {

View File

@@ -1,9 +1,28 @@
import { Button, DatePicker, Form, Input, InputNumber, Switch } from "antd";
import {
Button,
DatePicker,
Form,
Input,
InputNumber,
Select,
Switch,
} from "antd";
import moment from "moment";
import React, { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
export default function ShopEmployeesFormComponent({
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export function ShopEmployeesFormComponent({
bodyshop,
form,
selectedEmployee,
handleFinish,
@@ -117,7 +136,13 @@ export default function ShopEmployeesFormComponent({
message: t("general.validation.required"),
},
]}>
<Input />
<Select>
{bodyshop.md_responsibility_centers.costs.map((c) => (
<Select.Option key={c.name} value={c.name}>
{c.name}
</Select.Option>
))}
</Select>
</Form.Item>
<Form.Item
label={t("employees.fields.base_rate")}
@@ -133,3 +158,7 @@ export default function ShopEmployeesFormComponent({
</Form>
);
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(ShopEmployeesFormComponent);

View File

@@ -145,11 +145,10 @@ export function Manage({ match, conflict }) {
}, [t]);
return (
<Layout className="layout-container">
<Layout className='layout-container'>
<HeaderContainer />
<BreadCrumbs />
<Content className="content-container">
<Content className='content-container'>
<FcmNotification />
<ErrorBoundary>
{conflict ? (
@@ -158,8 +157,7 @@ export function Manage({ match, conflict }) {
<Suspense
fallback={
<LoadingSpinner message={t("general.labels.loadingapp")} />
}
>
}>
<EnterInvoiceModalContainer />
<EmailOverlayContainer />
<TimeTicketModalContainer />
@@ -331,13 +329,8 @@ export function Manage({ match, conflict }) {
</ErrorBoundary>
<ChatAffixContainer />
<BackTop />
<Layout.Footer> Some footer</Layout.Footer>
</Content>
{
// <Footer>
// <FooterComponent />
// </Footer>
}
</Layout>
);
}

View File

@@ -4,9 +4,16 @@ module.exports = {
name: "ImEX Online API",
script: "./server.js",
watch: true,
watch_delay: 1000,
ignore_watch: ["node_modules", "client/img"],
watch_options: {
followSymlinks: false,
},
env: {
NODE_ENV: "production",
},
instances: "max",
exec_mode: "cluster",
},
],
};