feature/IO-2681-Share-To-Teams-Button - checkpoint

This commit is contained in:
Dave Richer
2025-01-29 18:19:34 -05:00
parent 71a74c5437
commit a064b8e07e
10 changed files with 223 additions and 31 deletions

View File

@@ -19,6 +19,7 @@ import LockWrapperComponent from "../lock-wrapper/lock-wrapper.component";
import PartsReceiveModalContainer from "../parts-receive-modal/parts-receive-modal.container";
import PrintWrapper from "../print-wrapper/print-wrapper.component";
import PartsOrderDrawer from "./parts-order-list-table-drawer.component";
import ShareToTeamsButton from "../share-to-teams/share-to-teams-button.jsx";
const mapStateToProps = createStructuredSelector({
jobRO: selectJobReadOnly,
@@ -66,19 +67,21 @@ export function PartsOrderListTableComponent({
const parts_orders = billsQuery.data ? billsQuery.data.parts_orders : [];
const { refetch } = billsQuery;
// label: <ShareToTeamsButton noIcon={true} urlOverride={`${window.location.origin}${window.location.pathname}`} />
const recordActions = (record, showView = false) => (
<Space direction="horizontal" wrap>
<ShareToTeamsButton
linkText={""}
urlOverride={`${window.location.origin}/manage/jobs/${job.id}?partsorderid=${record.id}&tab=partssublet `}
/>
{showView && (
<Button
icon={<EyeFilled />}
onClick={() => {
handleOnRowClick(record);
}}
>
<EyeFilled />
</Button>
/>
)}
<Button
disabled={jobRO || record.return || record.vendor.id === bodyshop.inhousevendorid}
onClick={() => {
@@ -106,6 +109,7 @@ export function PartsOrderListTableComponent({
</Button>
<Button
title={t("tasks.buttons.create")}
icon={<FaTasks />}
onClick={() => {
setTaskUpsertContext({
context: {
@@ -114,9 +118,7 @@ export function PartsOrderListTableComponent({
}
});
}}
>
<FaTasks />
</Button>
/>
<Popconfirm
title={t("parts_orders.labels.confirmdelete")}
disabled={jobRO}
@@ -137,9 +139,7 @@ export function PartsOrderListTableComponent({
});
}}
>
<Button disabled={jobRO}>
<DeleteFilled />
</Button>
<Button disabled={jobRO} icon={<DeleteFilled />} />
</Popconfirm>
<Button