Updated contract detail screen to have unsaved changes indicator BOD-127
This commit is contained in:
@@ -2,6 +2,7 @@ import { DatePicker, Form, Input, InputNumber } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import ContractStatusSelector from "../contract-status-select/contract-status-select.component";
|
||||
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||
import InputPhone from "../form-items-formatted/phone-form-item.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
|
||||
@@ -9,6 +10,9 @@ export default function ContractFormComponent({ form }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
<div className="imex-flex-row__grow imex-flex-row__margin-large">
|
||||
<FormFieldsChanged form={form} />
|
||||
</div>
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
label={t("contracts.fields.status")}
|
||||
|
||||
@@ -10,7 +10,6 @@ export default function FormsFieldChanged({ form }) {
|
||||
const handleReset = () => {
|
||||
form.resetFields();
|
||||
};
|
||||
console.log("form.isFieldsTouched(true)", form.isFieldsTouched([], true));
|
||||
const loc = useLocation();
|
||||
|
||||
return (
|
||||
@@ -31,7 +30,7 @@ export default function FormsFieldChanged({ form }) {
|
||||
type="warning"
|
||||
message={
|
||||
<div>
|
||||
<span>{t("general.messages.unsavedchanges")}</span>
|
||||
<span>{t("general.messages.unsavedchanges")} </span>
|
||||
<span
|
||||
onClick={handleReset}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user