Skip to content

Commit

Permalink
fix parkedparentsource of pendingFlow and InputEntry of Funding Source
Browse files Browse the repository at this point in the history
  • Loading branch information
seniorITdev committed Jun 6, 2024
1 parent 663d171 commit 7135a6e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
21 changes: 9 additions & 12 deletions apps/hpc-ftsadmin/src/app/components/flow-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2625,18 +2625,7 @@ export const FlowForm = (props: Props) => {
}}
>
<StyledHalfSection>
<StyledFullSection
style={{
pointerEvents: readOnly
? 'none'
: isShowParentFlow
? 'none'
: 'auto',
opacity: readOnly ? 0.6 : isShowParentFlow ? 0.6 : 1,
position: 'relative',
}}
id="parentDiv"
>
<StyledFullSection id="parentDiv">
<C.FormSection title="Funding Source(s)" isLeftSection>
{values.parentFlow && values.parentFlow.length ? (
<StyledParentInfo
Expand Down Expand Up @@ -2710,6 +2699,7 @@ export const FlowForm = (props: Props) => {
isMulti
entryInfo={inputEntries.sourceOrganizations}
rejectInputEntry={rejectInputEntry}
isDisabled={isShowParentFlow}
/>
<StyledRow>
<StyledHalfSection>
Expand All @@ -2730,6 +2720,7 @@ export const FlowForm = (props: Props) => {
isAutocompleteAPI={false}
entryInfo={inputEntries.sourceUsageYears}
rejectInputEntry={rejectInputEntry}
isDisabled={isShowParentFlow}
/>
</StyledHalfSection>
<StyledHalfSection>
Expand All @@ -2743,6 +2734,7 @@ export const FlowForm = (props: Props) => {
isMulti
entryInfo={inputEntries.sourceLocations}
rejectInputEntry={rejectInputEntry}
isDisabled={isShowParentFlow}
/>
</StyledHalfSection>
</StyledRow>
Expand All @@ -2759,6 +2751,7 @@ export const FlowForm = (props: Props) => {
isMulti
entryInfo={inputEntries.sourceEmergencies}
rejectInputEntry={rejectInputEntry}
isDisabled={isShowParentFlow}
/>
<C.AsyncAutocompleteSelectFTSAdmin
label="Global Cluster(s)"
Expand All @@ -2774,6 +2767,7 @@ export const FlowForm = (props: Props) => {
isAutocompleteAPI={false}
entryInfo={inputEntries.sourceGlobalClusters}
rejectInputEntry={rejectInputEntry}
isDisabled={isShowParentFlow}
/>
<C.AsyncAutocompleteSelectFTSAdmin
label="Plan"
Expand All @@ -2786,6 +2780,7 @@ export const FlowForm = (props: Props) => {
}}
entryInfo={inputEntries.sourcePlans}
rejectInputEntry={rejectInputEntry}
isDisabled={isShowParentFlow}
/>
{showSourceGoverningEntities && (
<C.AsyncAutocompleteSelectFTSAdmin
Expand All @@ -2798,6 +2793,7 @@ export const FlowForm = (props: Props) => {
isAutocompleteAPI={false}
entryInfo={inputEntries.sourceGoverningEntities}
rejectInputEntry={rejectInputEntry}
isDisabled={isShowParentFlow}
/>
)}
<C.AsyncAutocompleteSelectFTSAdmin
Expand All @@ -2813,6 +2809,7 @@ export const FlowForm = (props: Props) => {
isMulti
entryInfo={inputEntries.sourceProjects}
rejectInputEntry={rejectInputEntry}
isDisabled={isShowParentFlow}
/>
</C.FormSection>
</StyledFullSection>
Expand Down
5 changes: 4 additions & 1 deletion apps/hpc-ftsadmin/src/app/pages/flows/pending-flows-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export default (props: Props) => {
'flow.updatedAt'
),
orderDir: withDefault(createEnumParam(['ASC', 'DESC']), 'DESC'),
filters: withDefault(JsonParam, JSON.stringify({})),
filters: withDefault(
JsonParam,
JSON.stringify({ includeChildrenOfParkedFlows: true })
),
tableHeaders: withDefault(StringParam, encodeTableHeaders([])), // Default value of table headers
prevPageCursor: withDefault(NumberParam, 0),
nextPageCursor: withDefault(NumberParam, 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ type AsyncAutocompleteSelectProps = {
values?: any;
alreadyIsFetch?: boolean;
fetchedData?: readonly FormObjectValue[];
isDisabled?: boolean;
};

const AsyncAutocompleteSelect = ({
Expand All @@ -102,6 +103,7 @@ const AsyncAutocompleteSelect = ({
withoutFormik = false,
values,
setFieldValue,
isDisabled,
...otherProps
}: AsyncAutocompleteSelectProps) => {
const [open, setOpen] = useState(false);
Expand Down Expand Up @@ -367,6 +369,7 @@ const AsyncAutocompleteSelect = ({
rejectInputEntry={rejectInputEntry}
alreadyIsFetch={isFetch}
fetchedData={options}
isDisabled={isDisabled}
/>
);
}
Expand All @@ -380,6 +383,7 @@ const AsyncAutocompleteSelect = ({
// ...field,
...otherProps,
multiple: isMulti,
disabled: isDisabled,
onOpen: () => {
setOpen(true);
},
Expand Down Expand Up @@ -554,6 +558,7 @@ const FormikAsyncAutocompleteSelect = ({
rejectInputEntry,
alreadyIsFetch,
fetchedData,
isDisabled,
...otherProps
}: AsyncAutocompleteSelectProps) => {
const [open, setOpen] = useState(false);
Expand Down Expand Up @@ -811,6 +816,7 @@ const FormikAsyncAutocompleteSelect = ({
> = {
...field,
...otherProps,
disabled: isDisabled,
multiple: isMulti,
onOpen: () => {
setOpen(true);
Expand Down

0 comments on commit 7135a6e

Please sign in to comment.