Skip to content

Commit

Permalink
Merge branch 'dev' into feat/SRS-674
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspalsingh-aot authored Dec 4, 2024
2 parents dfd8059 + e7daebe commit fe472db
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 37 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/components/search/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const SearchInput: React.FC<ISearchInput> = ({
<MagnifyingGlassIcon />
</span>
)}
<div>
<div className="w-100">
<input
id={searchId}
data-testid={searchId}
Expand Down
38 changes: 36 additions & 2 deletions frontend/src/app/features/details/notations/Notations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -865,15 +865,49 @@ const Notations: React.FC<IComponentProps> = ({ showPending = false }) => {
};

const handleNotationFormRowFirstChild = (metaData?: any) => {
const notationType = {
type: FormFieldType.DropDown,
label: 'Notation Type',
placeholder: 'Notation Type',
graphQLPropertyName: 'etypCode',
options: [],
value: '',
colSize: `${viewMode === SiteDetailsMode.EditMode ? 'col-lg-12 col-md-12 col-sm-12' : 'col-xxl-5 col-xl-5 col-lg-8 col-md-6 col-sm-12'}`,
customLabelCss: 'custom-notation-lbl-text',
customInputTextCss: 'custom-notation-input-text',
customEditLabelCss: 'custom-notation-edit-label',
customEditInputTextCss: 'custom-notation-edit-input',
};

const notationClass = {
type: FormFieldType.DropDown,
label: 'Notation Class',
placeholder: 'Notation Class',
graphQLPropertyName: 'eclsCode',
options: [],
value: '',
colSize: 'col-xxl-5 col-xl-5 col-lg-8 col-md-6 col-sm-12',
customLabelCss: 'custom-notation-lbl-text',
customInputTextCss: 'custom-notation-input-text',
customEditLabelCss: 'custom-notation-edit-label',
customEditInputTextCss: 'custom-notation-edit-input',
};
if (metaData && metaData.requiredDate) {
return updateOptionsBasedOnMetaData(
notationFormRowsFirstChildIsRequired,
viewMode === SiteDetailsMode.EditMode
? [
[notationClass, ...notationFormRowsFirstChildIsRequired[0]],
[notationType],
]
: [[notationType, ...notationFormRowsFirstChildIsRequired[0]]],
metaData,
'eclsCode',
);
} else {
return updateOptionsBasedOnMetaData(
notationFormRowsFirstChild,
viewMode === SiteDetailsMode.EditMode
? [[notationClass, ...notationFormRowsFirstChild[0]], [notationType]]
: [[notationType, ...notationFormRowsFirstChild[0]]],
metaData,
'eclsCode',
);
Expand Down
42 changes: 8 additions & 34 deletions frontend/src/app/features/details/notations/NotationsConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ export const GetNotationConfig = () => {
[
{
type: FormFieldType.DropDown,
label: 'Notation Type',
placeholder: 'Notation Type',
graphQLPropertyName: 'etypCode',
label: 'Notation Class',
placeholder: 'Notation Class',
graphQLPropertyName: 'eclsCode',
options: [],
value: '',
colSize: 'col-lg-11 col-md-11 col-sm-11 col-10',
Expand All @@ -143,9 +143,9 @@ export const GetNotationConfig = () => {
[
{
type: FormFieldType.DropDown,
label: 'Notation Class',
placeholder: 'Notation Class',
graphQLPropertyName: 'eclsCode',
label: 'Notation Type',
placeholder: 'Notation Type',
graphQLPropertyName: 'etypCode',
options: [],
value: '',
colSize: 'col-lg-12 col-md-12 col-sm-12',
Expand Down Expand Up @@ -364,19 +364,6 @@ export const GetNotationConfig = () => {

const notationFormRowsFirstChild: IFormField[][] = [
[
{
type: FormFieldType.DropDown,
label: 'Notation Type',
placeholder: 'Notation Type',
graphQLPropertyName: 'etypCode',
options: [],
value: '',
colSize: 'col-xxl-5 col-xl-5 col-lg-8 col-md-6 col-sm-12',
customLabelCss: 'custom-notation-lbl-text',
customInputTextCss: 'custom-notation-input-text',
customEditLabelCss: 'custom-notation-edit-label',
customEditInputTextCss: 'custom-notation-edit-input',
},
{
type: FormFieldType.Date,
label: 'Initiated Date',
Expand Down Expand Up @@ -409,19 +396,6 @@ export const GetNotationConfig = () => {

const notationFormRowsFirstChildIsRequired: IFormField[][] = [
[
{
type: FormFieldType.DropDown,
label: 'Notation Type',
placeholder: 'Notation Type',
graphQLPropertyName: 'etypCode',
options: [],
value: '',
colSize: 'col-xxl-5 col-xl-5 col-lg-8 col-md-6 col-sm-12',
customLabelCss: 'custom-notation-lbl-text',
customInputTextCss: 'custom-notation-input-text',
customEditLabelCss: 'custom-notation-edit-label',
customEditInputTextCss: 'custom-notation-edit-input',
},
{
type: FormFieldType.Date,
label: 'Initiated Date',
Expand All @@ -437,9 +411,9 @@ export const GetNotationConfig = () => {
},
{
type: FormFieldType.Date,
label: 'Completed Date',
label: 'Required Date',
placeholder: 'MM/DD/YY',
graphQLPropertyName: 'completionDate',
graphQLPropertyName: 'requirementDueDate',
value: [],
colSize:
'col-lg-4 col-md-6 col-sm-12 d-none d-xl-block d-xxl-block d-lg-block d-md-block',
Expand Down

0 comments on commit fe472db

Please sign in to comment.