Compare commits

...

19 Commits

Author SHA1 Message Date
Patrick Fic
991dfc2ad5 IO-2707 resolve time ticket modal rerender issue. 2024-09-05 08:17:45 -07:00
Allan Carr
718c8291a8 Merged in release/2024-08-30 (pull request #1679)
IO-2894 Null check
2024-09-03 16:01:19 +00:00
Allan Carr
f1e84c348b Merged in feature/IO-2894-Modify-Shift-Memo (pull request #1677)
IO-2894 Null check
2024-09-03 15:54:13 +00:00
Allan Carr
5f513a8bef Merged in release/2024-08-30 (pull request #1676)
IO-2892 Correct Cron Trigger
2024-08-31 18:56:03 +00:00
Allan Carr
4b96d5a707 Merged in feature/IO-2892-Autohouse-Claimscorp-Cron (pull request #1674)
IO-2892 Correct Cron Trigger
2024-08-31 18:53:26 +00:00
Allan Carr
220f3d4410 IO-2892 Correct Cron Trigger
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-31 11:53:02 -07:00
Allan Carr
841f62bd84 Merged in release/2024-08-30 (pull request #1673)
Release/2024 08 30
2024-08-30 20:34:21 +00:00
Allan Carr
91e2e7931b Merged in feature/IO-2894-Modify-Shift-Memo (pull request #1671)
Feature/IO-2894 Modify Shift Memo
2024-08-29 22:00:14 +00:00
Allan Carr
3c6faf8473 Merged in feature/IO-2893-Editing-Shift-Tickets (pull request #1670)
Feature/IO-2893 Editing Shift Tickets
2024-08-29 20:48:43 +00:00
Allan Carr
c994eaaa8e IO-2893 Correct RBACs for editing tickets
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-29 13:48:39 -07:00
Allan Carr
517d8f4163 IO-2893 Editing Shift Tickets
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-29 13:39:21 -07:00
Allan Carr
9deb2964a5 Merged in feature/IO-2892-Autohouse-Claimscorp-Cron (pull request #1668)
Feature/IO-2892 Autohouse Claimscorp Cron
2024-08-29 20:03:23 +00:00
Allan Carr
9cf9f8b844 Merged in feature/IO-2901-Production-Board-List-empty-config (pull request #1669)
IO-2901 Production Board List config
2024-08-29 20:03:12 +00:00
Allan Carr
ad46ea74c0 IO-2901 Production Board List config
If production_config=[] then board crashes as it can't find production_config[0]

Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-29 13:03:30 -07:00
Allan Carr
2a28855e4b IO-2892 Gate for non-production environment
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-29 08:47:59 -07:00
Allan Carr
8d25f60097 Merge branch 'master-AIO' into feature/IO-2892-Autohouse-Claimscorp-Cron
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>

# Conflicts:
#	hasura/metadata/cron_triggers.yaml
2024-08-28 17:29:15 -07:00
Allan Carr
982a51f16e Merged in feature/IO-2890-Kaizen-Datapump-Cron (pull request #1666)
IO-2890 Gate if environment isn't Production
2024-08-28 23:17:17 +00:00
Allan Carr
68d02648d7 IO-2890 Gate if environment isn't Production
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-28 16:15:32 -07:00
Allan Carr
89d5b1cfe4 IO-2892 Autohouse & Claimscorp Data Pump Cron
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2024-08-22 16:42:42 -07:00
7 changed files with 135 additions and 77 deletions

View File

@@ -1,23 +1,23 @@
import React, { useEffect, useMemo, useRef, useState } from "react";
import { Button, Dropdown, Input, Space, Statistic, Table } from "antd";
import { SyncOutlined } from "@ant-design/icons";
import { PageHeader } from "@ant-design/pro-layout";
import { useSplitTreatments } from "@splitsoftware/splitio-react";
import { Button, Dropdown, Input, Space, Statistic, Table } from "antd";
import _ from "lodash";
import React, { useEffect, useMemo, useRef, useState } from "react";
import ReactDragListView from "react-drag-listview";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectTechnician } from "../../redux/tech/tech.selectors";
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
import Prompt from "../../utils/prompt.js";
import AlertComponent from "../alert/alert.component.jsx";
import ProductionListColumnsAdd from "../production-list-columns/production-list-columns.add.component";
import ProductionListColumns from "../production-list-columns/production-list-columns.data";
import ProductionListDetail from "../production-list-detail/production-list-detail.component";
import { ProductionListConfigManager } from "./production-list-config-manager.component.jsx";
import ProductionListPrint from "./production-list-print.component";
import ResizeableTitle from "./production-list-table.resizeable.component";
import { useSplitTreatments } from "@splitsoftware/splitio-react";
import { SyncOutlined } from "@ant-design/icons";
import Prompt from "../../utils/prompt.js";
import _ from "lodash";
import AlertComponent from "../alert/alert.component.jsx";
import { ProductionListConfigManager } from "./production-list-config-manager.component.jsx";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -43,7 +43,7 @@ export function ProductionListTable({ loading, data, refetch, bodyshop, technici
const initialStateRef = useRef(
(bodyshop.production_config &&
bodyshop.production_config.find((p) => p.name === defaultView)?.columns.tableState) ||
bodyshop.production_config[0]?.columns.tableState || {
(bodyshop.production_config && bodyshop.production_config[0]?.columns.tableState) || {
sortedInfo: {},
filteredInfo: { text: "" }
}

View File

@@ -206,76 +206,98 @@ export function TimeTicketList({
return null;
}
}
},
}
]),
{
title: t("timetickets.fields.created_by"),
dataIndex: "created_by",
key: "created_by",
sorter: (a, b) => alphaSort(a.created_by, b.created_by),
sortOrder: state.sortedInfo.columnKey === "created_by" && state.sortedInfo.order,
render: (text, record) => record.created_by
},
// {
// title: "Pay",
// dataIndex: "pay",
// key: "pay",
// render: (text, record) =>
// Dinero({ amount: Math.round(record.rate * 100) })
// .multiply(record.flat_rate ? record.productivehrs : record.actualhrs)
// .toFormat("$0.00"),
// },
{
title: t("general.labels.actions"),
dataIndex: "actions",
key: "actions",
render: (text, record) => (
<Space wrap>
{techConsole && (
<TimeTicketEnterButton
actions={{ refetch }}
context={{ id: record.id, timeticket: record }}
disabled={!record.job || disabled}
>
<EditFilled />
</TimeTicketEnterButton>
)}
{!techConsole && (
<RbacWrapper
action="timetickets:edit"
noauth={() => {
return <div />;
}}
>
<TimeTicketEnterButton
actions={{ refetch }}
context={{
id: record.id,
timeticket: record
}}
disabled={
HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:editcommitted"
}) &&
HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:shiftedit"
})
{
title: t("timetickets.fields.created_by"),
dataIndex: "created_by",
key: "created_by",
sorter: (a, b) => alphaSort(a.created_by, b.created_by),
sortOrder: state.sortedInfo.columnKey === "created_by" && state.sortedInfo.order,
render: (text, record) => record.created_by
},
// {
// title: "Pay",
// dataIndex: "pay",
// key: "pay",
// render: (text, record) =>
// Dinero({ amount: Math.round(record.rate * 100) })
// .multiply(record.flat_rate ? record.productivehrs : record.actualhrs)
// .toFormat("$0.00"),
// },
{
title: t("general.labels.actions"),
dataIndex: "actions",
key: "actions",
render: (text, record) => (
<Space wrap>
{techConsole && (
<TimeTicketEnterButton
actions={{ refetch }}
context={{ id: record.id, timeticket: record }}
disabled={!record.job || disabled}
>
<EditFilled />
</TimeTicketEnterButton>
)}
{!techConsole && (
<RbacWrapper
action="timetickets:edit"
noauth={() => {
return <div />;
}}
>
<TimeTicketEnterButton
actions={{ refetch }}
context={{
id: record.id,
timeticket: record
}}
disabled={
record.ciecacode
? record.committed_at
? HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:editcommitted"
}) &&
HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:edit"
})
: HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:edit"
})
: record.committed_at
? HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:editcommitted"
}) &&
HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:shiftedit"
})
: HasRbacAccess({
bodyshop,
authLevel: authLevel,
action: "timetickets:shiftedit"
})
? disabled
: !record.jobid
}
>
<EditFilled />
</TimeTicketEnterButton>
</RbacWrapper>
)}
</Space>
)
}
}
>
<EditFilled />
</TimeTicketEnterButton>
</RbacWrapper>
)}
</Space>
)
}
];
const handleTableChange = (pagination, filters, sorter) => {

View File

@@ -329,7 +329,9 @@ export function LaborAllocationContainer({ jobid, loading, lineTicketData, hideT
timetickets={lineTicketData.timetickets}
adjustments={lineTicketData.jobs_by_pk.lbr_adjustments}
/>
{!hideTimeTickets && <TimeTicketList loading={loading} timetickets={lineTicketData.timetickets} techConsole />}
{!hideTimeTickets && (
<TimeTicketList loading={loading} timetickets={jobid ? lineTicketData.timetickets : []} techConsole />
)}
</div>
);
}

View File

@@ -1,3 +1,19 @@
- name: AutoHouse Data Pump
webhook: '{{HASURA_API_URL}}/data/ah'
schedule: 0 6 * * *
include_in_metadata: true
payload: {}
headers:
- name: x-imex-auth
value_from_env: DATAPUMP_AUTH
- name: Claimscorp Data Pump
webhook: '{{HASURA_API_URL}}/data/cc'
schedule: 30 6 * * *
include_in_metadata: true
payload: {}
headers:
- name: x-imex-auth
value_from_env: DATAPUMP_AUTH
- name: Kaizen Data Pump
webhook: '{{HASURA_API_URL}}/data/kaizen'
schedule: 30 5 * * *

View File

@@ -31,6 +31,12 @@ const ftpSetup = {
};
exports.default = async (req, res) => {
// Only process if in production environment.
if (process.env.NODE_ENV !== "production") {
res.sendStatus(403);
return;
}
//Query for the List of Bodyshop Clients.
logger.log("autohouse-start", "DEBUG", "api", null, null);
const { bodyshops } = await client.request(queries.GET_AUTOHOUSE_SHOPS);

View File

@@ -31,6 +31,12 @@ const ftpSetup = {
};
exports.default = async (req, res) => {
// Only process if in production environment.
if (process.env.NODE_ENV !== "production") {
res.sendStatus(403);
return;
}
//Query for the List of Bodyshop Clients.
logger.log("claimscorp-start", "DEBUG", "api", null, null);
const { bodyshops } = await client.request(queries.GET_CLAIMSCORP_SHOPS);

View File

@@ -31,6 +31,12 @@ const ftpSetup = {
};
exports.default = async (req, res) => {
// Only process if in production environment.
if (process.env.NODE_ENV !== "production") {
res.sendStatus(403);
return;
}
//Query for the List of Bodyshop Clients.
logger.log("kaizen-start", "DEBUG", "api", null, null);
const kaizenShopsIDs = ["SUMMIT", "STRATHMORE", "SUNRIDGE", "SHAW"];