Minor cleanup for ProManager
This commit is contained in:
@@ -8,5 +8,7 @@
|
|||||||
"export": "date",
|
"export": "date",
|
||||||
"csi": "Date",
|
"csi": "Date",
|
||||||
"courtesycars": "date",
|
"courtesycars": "date",
|
||||||
"media": "date"
|
"media": "date",
|
||||||
|
"visualboard": "date",
|
||||||
|
"scoreboard": "date"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,8 +28,10 @@ switch (this.location.hostname) {
|
|||||||
// measurementId: "${config.measurementId}",
|
// measurementId: "${config.measurementId}",
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
//TODO:AIO Update this for pro manager and include all .env files for server and client.
|
|
||||||
case "romeonline.io":
|
case "romeonline.io":
|
||||||
|
case "test.romeonline.io":
|
||||||
|
case "test.promanager.web-est.com":
|
||||||
|
case "promanager.web-est.com":
|
||||||
firebaseConfig = {
|
firebaseConfig = {
|
||||||
apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
|
apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
|
||||||
authDomain: "rome-prod-1.firebaseapp.com",
|
authDomain: "rome-prod-1.firebaseapp.com",
|
||||||
@@ -40,6 +42,7 @@ switch (this.location.hostname) {
|
|||||||
measurementId: "G-G8Z9DRHTZS",
|
measurementId: "G-G8Z9DRHTZS",
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "imex.online":
|
case "imex.online":
|
||||||
default:
|
default:
|
||||||
firebaseConfig = {
|
firebaseConfig = {
|
||||||
|
|||||||
@@ -24,13 +24,15 @@ const defaultTheme = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
token: {
|
token: {
|
||||||
colorPrimary: InstanceRenderMgr({ //TODO:AIO Add in ProMan colors.
|
colorPrimary: InstanceRenderMgr({
|
||||||
imex: '#1890ff',
|
imex: '#1890ff',
|
||||||
rome: '#326ade',
|
rome: '#326ade',
|
||||||
|
promanager:"#1d69a6"
|
||||||
}),
|
}),
|
||||||
colorInfo: InstanceRenderMgr({
|
colorInfo: InstanceRenderMgr({
|
||||||
imex: '#1890ff',
|
imex: '#1890ff',
|
||||||
rome: '#326ade',
|
rome: '#326ade',
|
||||||
|
promanager:"#1d69a6"
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -343,19 +343,38 @@ function Header({
|
|||||||
icon: <ScheduleOutlined />,
|
icon: <ScheduleOutlined />,
|
||||||
label: <Link to="/manage/production/list">{t('menus.header.productionlist')}</Link>,
|
label: <Link to="/manage/production/list">{t('menus.header.productionlist')}</Link>,
|
||||||
},
|
},
|
||||||
{
|
...(InstanceRenderManager({
|
||||||
key: 'productionboard',
|
imex: true,
|
||||||
icon: <Icon component={BsKanban} />,
|
rome: true,
|
||||||
label: <Link to="/manage/production/board">{t('menus.header.productionboard')}</Link>,
|
promanager: HasFeatureAccess({ featureName: 'visualboard', bodyshop }),
|
||||||
},
|
})
|
||||||
{
|
? [
|
||||||
type: 'divider',
|
{
|
||||||
},
|
key: 'productionboard',
|
||||||
{
|
icon: <Icon component={BsKanban} />,
|
||||||
key: 'scoreboard',
|
label: (
|
||||||
icon: <LineChartOutlined />,
|
<Link to="/manage/production/board">{t('menus.header.productionboard')}</Link>
|
||||||
label: <Link to="/manage/scoreboard">{t('menus.header.scoreboard')}</Link>,
|
),
|
||||||
},
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
|
||||||
|
...(InstanceRenderManager({
|
||||||
|
imex: true,
|
||||||
|
rome: true,
|
||||||
|
promanager: HasFeatureAccess({ featureName: 'scoreboard', bodyshop }),
|
||||||
|
})
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
type: 'divider',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'scoreboard',
|
||||||
|
icon: <LineChartOutlined />,
|
||||||
|
label: <Link to="/manage/scoreboard">{t('menus.header.scoreboard')}</Link>,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import {DateTimeFormatter} from "../../utils/DateFormatter";
|
|||||||
import FormDateTimePickerComponent from "../form-date-time-picker/form-date-time-picker.component";
|
import FormDateTimePickerComponent from "../form-date-time-picker/form-date-time-picker.component";
|
||||||
import dayjs from "../../utils/day";
|
import dayjs from "../../utils/day";
|
||||||
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
import {useSplitTreatments} from "@splitsoftware/splitio-react";
|
||||||
|
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -635,36 +636,40 @@ export function JobsDetailHeaderActions({
|
|||||||
disabled: job.status !== bodyshop.md_ro_statuses.default_scheduled,
|
disabled: job.status !== bodyshop.md_ro_statuses.default_scheduled,
|
||||||
label: t("menus.jobsactions.cancelallappointments")
|
label: t("menus.jobsactions.cancelallappointments")
|
||||||
},
|
},
|
||||||
{
|
...InstanceRenderManager({imex: [ {
|
||||||
key: 'intake',
|
key: 'intake',
|
||||||
disabled: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO,
|
disabled: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO,
|
||||||
label: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO ? (
|
label: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO ? (
|
||||||
t("jobs.actions.intake")
|
t("jobs.actions.intake")
|
||||||
) : (
|
) : (
|
||||||
<Link to={`/manage/jobs/${job.id}/intake`}>
|
<Link to={`/manage/jobs/${job.id}/intake`}>
|
||||||
{t("jobs.actions.intake")}
|
{t("jobs.actions.intake")}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'deliver',
|
key: 'deliver',
|
||||||
disabled: !jobInProduction || jobRO,
|
disabled: !jobInProduction || jobRO,
|
||||||
label: !jobInProduction ? (
|
label: !jobInProduction ? (
|
||||||
t("jobs.actions.deliver")
|
t("jobs.actions.deliver")
|
||||||
) : (
|
) : (
|
||||||
<Link to={`/manage/jobs/${job.id}/deliver`}>
|
<Link to={`/manage/jobs/${job.id}/deliver`}>
|
||||||
{t("jobs.actions.deliver")}
|
{t("jobs.actions.deliver")}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'checklist',
|
key: 'checklist',
|
||||||
disabled: !job.converted,
|
disabled: !job.converted,
|
||||||
label: <Link to={`/manage/jobs/${job.id}/checklist`}>
|
label: <Link to={`/manage/jobs/${job.id}/checklist`}>
|
||||||
{t("jobs.actions.viewchecklist")}
|
{t("jobs.actions.viewchecklist")}
|
||||||
</Link>
|
</Link>
|
||||||
},
|
},], rome: "USE_IMEX", promanager:[]}),
|
||||||
{
|
...(InstanceRenderManager({
|
||||||
|
imex: true,
|
||||||
|
rome: "USE_IMEX",
|
||||||
|
promanager: HasFeatureAccess({ featureName: 'timetickets', bodyshop }),
|
||||||
|
}) ? [ {
|
||||||
key: "entertimetickets",
|
key: "entertimetickets",
|
||||||
disabled: !job.converted || (!bodyshop.tt_allow_post_to_invoiced && job.date_invoiced),
|
disabled: !job.converted || (!bodyshop.tt_allow_post_to_invoiced && job.date_invoiced),
|
||||||
label: t("timetickets.actions.enter"),
|
label: t("timetickets.actions.enter"),
|
||||||
@@ -681,7 +686,8 @@ export function JobsDetailHeaderActions({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}];
|
}] : [])
|
||||||
|
];
|
||||||
|
|
||||||
if (bodyshop.md_tasks_presets.enable_tasks) {
|
if (bodyshop.md_tasks_presets.enable_tasks) {
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
@@ -729,13 +735,15 @@ export function JobsDetailHeaderActions({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
menuItems.push({
|
if(HasFeatureAccess({featureName: 'courtesycars'})){
|
||||||
key: 'cccontract',
|
menuItems.push({
|
||||||
disabled: jobRO || !job.converted,
|
key: 'cccontract',
|
||||||
label: <Link state={{jobId: job.id}} to='/manage/courtesycars/contracts/new'>
|
disabled: jobRO || !job.converted,
|
||||||
{t("menus.jobsactions.newcccontract")}
|
label: <Link state={{jobId: job.id}} to='/manage/courtesycars/contracts/new'>
|
||||||
</Link>
|
{t("menus.jobsactions.newcccontract")}
|
||||||
});
|
</Link>
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
menuItems.push(
|
menuItems.push(
|
||||||
job.inproduction ?
|
job.inproduction ?
|
||||||
@@ -800,7 +808,11 @@ export function JobsDetailHeaderActions({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
... InstanceRenderManager({
|
||||||
|
imex: true,
|
||||||
|
rome: true,
|
||||||
|
promanager: HasFeatureAccess({ featureName: 'bills', bodyshop }),
|
||||||
|
}) ? [ {
|
||||||
key: 'postbills',
|
key: 'postbills',
|
||||||
disabled: !job.converted,
|
disabled: !job.converted,
|
||||||
label: t("jobs.actions.postbills"),
|
label: t("jobs.actions.postbills"),
|
||||||
@@ -814,7 +826,8 @@ export function JobsDetailHeaderActions({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},] : [],
|
||||||
|
|
||||||
{
|
{
|
||||||
key: 'addtopartsqueue',
|
key: 'addtopartsqueue',
|
||||||
disabled: !job.converted || !jobInProduction || jobRO,
|
disabled: !job.converted || !jobInProduction || jobRO,
|
||||||
@@ -867,14 +880,21 @@ export function JobsDetailHeaderActions({
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
menuItems.push(
|
if( InstanceRenderManager({
|
||||||
{
|
imex: true,
|
||||||
key: 'exportcustdata',
|
rome: true,
|
||||||
disabled: !job.converted,
|
promanager: HasFeatureAccess({ featureName: 'export', bodyshop }),
|
||||||
label: t("jobs.actions.exportcustdata"),
|
})){
|
||||||
onClick: handleExportCustData
|
|
||||||
}
|
menuItems.push(
|
||||||
);
|
{
|
||||||
|
key: 'exportcustdata',
|
||||||
|
disabled: !job.converted,
|
||||||
|
label: t("jobs.actions.exportcustdata"),
|
||||||
|
onClick: handleExportCustData
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (HasFeatureAccess({featureName: "csi", bodyshop})) {
|
if (HasFeatureAccess({featureName: "csi", bodyshop})) {
|
||||||
const children = [
|
const children = [
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export function JobsDetailRatesTaxes({
|
|||||||
rootElements: true,
|
rootElements: true,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
jobRO,
|
jobRO,
|
||||||
|
key: `root${tyCounter}`
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -39,11 +40,13 @@ export function JobsDetailRatesTaxes({
|
|||||||
typeNumIterator: iterator,
|
typeNumIterator: iterator,
|
||||||
rootElements: false,
|
rootElements: false,
|
||||||
jobRO,
|
jobRO,
|
||||||
|
key: `nonroot${iterator}`
|
||||||
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
formItems.push(<>
|
formItems.push(<>
|
||||||
<Space wrap>
|
<Space key={`section${tyCounter}`} wrap>
|
||||||
{section}
|
{section}
|
||||||
</Space>
|
</Space>
|
||||||
<Divider/>
|
<Divider/>
|
||||||
@@ -71,13 +74,15 @@ function TaxFormItems({
|
|||||||
rootElements,
|
rootElements,
|
||||||
bodyshopjobRO,
|
bodyshopjobRO,
|
||||||
jobRO,
|
jobRO,
|
||||||
|
key
|
||||||
}) {
|
}) {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
|
|
||||||
if (rootElements)
|
if (rootElements)
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
key={key}
|
||||||
label={t("bodyshop.fields.responsibilitycenter_tax_type", {
|
label={t("bodyshop.fields.responsibilitycenter_tax_type", {
|
||||||
typeNum,
|
typeNum,
|
||||||
typeNumIterator,
|
typeNumIterator,
|
||||||
@@ -92,7 +97,7 @@ function TaxFormItems({
|
|||||||
>
|
>
|
||||||
<Input disabled={jobRO}/>
|
<Input disabled={jobRO}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -102,6 +107,7 @@ function TaxFormItems({
|
|||||||
typeNum,
|
typeNum,
|
||||||
typeNumIterator,
|
typeNumIterator,
|
||||||
})}
|
})}
|
||||||
|
key={key + "tax_tier"}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -117,6 +123,7 @@ function TaxFormItems({
|
|||||||
typeNum,
|
typeNum,
|
||||||
typeNumIterator,
|
typeNumIterator,
|
||||||
})}
|
})}
|
||||||
|
key={key + "tax_thres"}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -132,6 +139,7 @@ function TaxFormItems({
|
|||||||
typeNum,
|
typeNum,
|
||||||
typeNumIterator,
|
typeNumIterator,
|
||||||
})}
|
})}
|
||||||
|
key={key + "tax_rate"}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -147,6 +155,7 @@ function TaxFormItems({
|
|||||||
typeNum,
|
typeNum,
|
||||||
typeNumIterator,
|
typeNumIterator,
|
||||||
})}
|
})}
|
||||||
|
key={key + "tax_sur"}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ export function ProductionBoardKanbanComponent({
|
|||||||
newChildCard ? newChildCard.id : null,
|
newChildCard ? newChildCard.id : null,
|
||||||
newChildCardNewParent
|
newChildCardNewParent
|
||||||
),
|
),
|
||||||
// TODO: optimisticResponse
|
|
||||||
});
|
});
|
||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: card.id,
|
jobid: card.id,
|
||||||
|
|||||||
@@ -245,14 +245,13 @@ export function TimeTicketModalComponent({
|
|||||||
<InputNumber precision={1}/>
|
<InputNumber precision={1}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{
|
{
|
||||||
// TODO:AIO Check if this is still needed?
|
// <TimeTicketCalculatorComponent
|
||||||
}
|
// jobid={form.getFieldValue("jobid")}
|
||||||
<TimeTicketCalculatorComponent
|
// setProductiveHours={(productivehrs) =>
|
||||||
jobid={form.getFieldValue("jobid")}
|
// form.setFieldsValue({productivehrs})
|
||||||
setProductiveHours={(productivehrs) =>
|
// }
|
||||||
form.setFieldsValue({productivehrs})
|
// />
|
||||||
}
|
}
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export function ProductionBoardContainer({
|
|||||||
}, [t, setBreadcrumbs, setSelectedHeader]);
|
}, [t, setBreadcrumbs, setSelectedHeader]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FeatureWrapper featureName="production-board">
|
<FeatureWrapper featureName="visualboard">
|
||||||
<RbacWrapper action="production:board">
|
<RbacWrapper action="production:board">
|
||||||
<ProductionBoardComponent/>
|
<ProductionBoardComponent/>
|
||||||
</RbacWrapper>
|
</RbacWrapper>
|
||||||
|
|||||||
@@ -260,8 +260,7 @@ export function* sendPasswordResetEmailSaga({payload}) {
|
|||||||
try {
|
try {
|
||||||
yield sendPasswordResetEmail(auth, payload, {
|
yield sendPasswordResetEmail(auth, payload, {
|
||||||
url:
|
url:
|
||||||
InstanceRenderManager({imex: "https://imex.online/passwordreset", rome:"https://romeonline.io/passwordreset"})
|
InstanceRenderManager({imex: "https://imex.online/passwordreset", rome:"https://romeonline.io/passwordreset", promanager:"https:promanager.web-est.com/passwordreset"})
|
||||||
//TODO:AIO Update for Promanager firebase instance.
|
|
||||||
,
|
,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user