Merged in feature/IO-2553-Edit-CC-Unsaved-Changes (pull request #1388)
IO-2553 Unsaved Changes on Edit CC Approved-by: Dave Richer
This commit is contained in:
@@ -10,11 +10,15 @@ import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel
|
|||||||
import CourtesyCarReadiness from "../courtesy-car-readiness-select/courtesy-car-readiness-select.component";
|
import CourtesyCarReadiness from "../courtesy-car-readiness-select/courtesy-car-readiness-select.component";
|
||||||
import CourtesyCarStatus from "../courtesy-car-status-select/courtesy-car-status-select.component";
|
import CourtesyCarStatus from "../courtesy-car-status-select/courtesy-car-status-select.component";
|
||||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
//import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
|
||||||
export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
export default function CourtesyCarCreateFormComponent({
|
||||||
|
form,
|
||||||
|
saveLoading,
|
||||||
|
newCC,
|
||||||
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
|
|
||||||
@@ -33,7 +37,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <FormFieldsChanged form={form} /> */}
|
{newCC ? null : <FormFieldsChanged form={form} />}
|
||||||
<LayoutFormRow header={t("courtesycars.labels.vehicle")}>
|
<LayoutFormRow header={t("courtesycars.labels.vehicle")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("courtesycars.fields.year")}
|
label={t("courtesycars.fields.year")}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export const QUERY_AVAILABLE_CC = gql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const CHECK_CC_FLEET_NUMBER = gql`
|
export const CHECK_CC_FLEET_NUMBER = gql`
|
||||||
query CHECK_VENDOR_NAME($name: String!) {
|
query CHECK_CC_FLEET_NUMBER($name: String!) {
|
||||||
courtesycars_aggregate(where: { fleetnumber: { _ilike: $name } }) {
|
courtesycars_aggregate(where: { fleetnumber: { _ilike: $name } }) {
|
||||||
aggregate {
|
aggregate {
|
||||||
count
|
count
|
||||||
|
|||||||
@@ -76,7 +76,11 @@ export function CourtesyCarCreateContainer({
|
|||||||
onFinish={handleFinish}
|
onFinish={handleFinish}
|
||||||
layout="vertical"
|
layout="vertical"
|
||||||
>
|
>
|
||||||
<CourtesyCarFormComponent form={form} saveLoading={loading} />
|
<CourtesyCarFormComponent
|
||||||
|
form={form}
|
||||||
|
saveLoading={loading}
|
||||||
|
newCC={true}
|
||||||
|
/>
|
||||||
</Form>
|
</Form>
|
||||||
</RbacWrapper>
|
</RbacWrapper>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user