Skip to content

Commit

Permalink
Merge branch 'dev' into anton/fix-forwardRef
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhila-aot authored Dec 18, 2024
2 parents 3ad6ba9 + 449b9a7 commit d0279ad
Show file tree
Hide file tree
Showing 15 changed files with 691 additions and 86 deletions.
25 changes: 23 additions & 2 deletions backend/src/app/services/site/site.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,18 @@ describe('SiteService', () => {
userAction: 'pending',
apiAction: 'pending',
srAction: 'pending',
notationParticipant: null,
notationParticipant: [
{
apiAction: UserActionEnum.ADDED,
eventParticId: 'xxx-xxx',
eventId: '1',
eprCode: 'RVB',
psnorgId: '1',
displayName: 'SAGER, J.',
srAction: 'false',
userAction: 'pending',
},
],
},
],
};
Expand Down Expand Up @@ -1046,7 +1057,17 @@ describe('SiteService', () => {
id: '1',
etypCode: 'type',
eclsCode: 'class',
notationParticipant: [],
notationParticipant: [
{
apiAction: UserActionEnum.ADDED,
eventParticId: 'xxx-xxx',
eventId: '1',
eprCode: 'RVB',
psnorgId: '1',
displayName: 'SAGER, J.',
srAction: 'false',
},
],
},
];
const userInfo = { givenName: 'Updated User' };
Expand Down
8 changes: 8 additions & 0 deletions backend/src/app/services/site/site.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,14 @@ export class SiteService {
// Process related participants regardless of event action
if (notationParticipant?.length > 0) {
await processParticipants(notationId, notationParticipant);
} else {
this.sitesLogger.warn(
`SiteService.processEvents(): There is no notation participants. Atleast every notation should have one notation participant.`,
);
throw new HttpException(
`Failed to process site notation participants. There is no notation participants. Atleast every notation should have one notation participant.`,
HttpStatus.NOT_FOUND,
);
}
});

Expand Down
5 changes: 5 additions & 0 deletions frontend/src/app/components/form/Form.css
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,8 @@ input::placeholder {
.dropdown {
position: unset !important;
}

.required-field::after {
content: ' *';
color: red;
}
12 changes: 12 additions & 0 deletions frontend/src/app/components/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const Form: React.FC<IFormRendererProps> = ({
isLoading={isLoading}
customInfoMessage={field.customInfoMessage}
customMenuMessage={field.customMenuMessage}
isDisabled={field.isDisabled}
/>
)}
{field.type === FormFieldType.TextArea && (
Expand All @@ -109,6 +110,7 @@ const Form: React.FC<IFormRendererProps> = ({
srMode={srMode ?? false}
textAreaRow={field.textAreaRow}
textAreaColoum={field.textAreaColoum}
isDisabled={field.isDisabled}
/>
)}
{field.type === FormFieldType.DropDown && (
Expand All @@ -129,6 +131,8 @@ const Form: React.FC<IFormRendererProps> = ({
isEditing={editMode ?? true}
isImage={field.isImage}
srMode={srMode ?? false}
validation={field.validation}
isDisabled={field.isDisabled}
/>
)}
{field.type === FormFieldType.DropDownWithSearch && (
Expand All @@ -152,6 +156,8 @@ const Form: React.FC<IFormRendererProps> = ({
filteredOptions={field.filteredOptions || []}
isLoading={field.isLoading}
customInfoMessage={field.customInfoMessage}
isDisabled={field.isDisabled}
validation={field.validation}
/>
)}
{field.type === FormFieldType.DateRange && (
Expand All @@ -170,6 +176,7 @@ const Form: React.FC<IFormRendererProps> = ({
type={field.type}
isEditing={editMode ?? true}
srMode={srMode ?? false}
validation={field.validation}
/>
)}
{field.type === FormFieldType.Date && (
Expand All @@ -189,6 +196,7 @@ const Form: React.FC<IFormRendererProps> = ({
isEditing={editMode ?? true}
srMode={srMode ?? false}
isDisabled={field.isDisabled ?? false}
validation={field.validation}
/>
)}
{field.type === FormFieldType.Group && (
Expand All @@ -202,6 +210,7 @@ const Form: React.FC<IFormRendererProps> = ({
placeholder: child.placeholder,
value: formData[child.graphQLPropertyName ?? ''] || '',
suffix: child.suffix,
isDisabled: child.isDisabled,
onChange: (value: any) =>
handleInputChange(child.graphQLPropertyName, value),
}))}
Expand All @@ -219,6 +228,8 @@ const Form: React.FC<IFormRendererProps> = ({
customEditInputTextCss={field.customEditInputTextCss}
customPlaceholderCss={field.customPlaceholderCss}
customInfoMessage={field.customInfoMessage}
validation={field.validation}
isDisabled={field.isDisabled}
/>
)}
{field.type === FormFieldType.Checkbox && (
Expand All @@ -236,6 +247,7 @@ const Form: React.FC<IFormRendererProps> = ({
handleInputChange(field.graphQLPropertyName, value)
}
srMode={srMode}
validation={field.validation}
/>
)}
</div>
Expand Down
Loading

0 comments on commit d0279ad

Please sign in to comment.