Skip to content

Commit

Permalink
Merge pull request #194 from IFRCGo/fix/subscription-admin
Browse files Browse the repository at this point in the history
Fix admin1 condition
  • Loading branch information
roshni73 authored Dec 9, 2024
2 parents 115872f + a60cf39 commit 3ec6212
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/views/Home/AlertsTable/AlertActions/i18n.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"namespace": "alertActions",
"strings": {
"alertTableViewDetailsTitle":"View Details"
"alertTableViewDetailsTitle": "View Details",
"alertCopyAlertURL": "Copy alert URL"
}
}
2 changes: 1 addition & 1 deletion src/views/Home/AlertsTable/AlertActions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function AlertActions(props: Props) {
name={undefined}
onClick={handleClick}
variant="tertiary"
title="Copy alert URL"
title={strings.alertCopyAlertURL}
>
<CopyLineIcon />
</Button>
Expand Down
6 changes: 3 additions & 3 deletions src/views/NewSubscriptionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ function NewSubscriptionModal(props: Props) {
}), [subscription]);

const {
pristine,
value,
setFieldValue,
error: formError,
Expand Down Expand Up @@ -315,11 +316,11 @@ function NewSubscriptionModal(props: Props) {
}

if (response.ok) {
onCloseModal();
alert.show(
strings.newSubscriptionCreatedSuccessfully,
{ variant: 'success' },
);
onCloseModal();
if (onSuccess) {
onSuccess();
}
Expand Down Expand Up @@ -466,7 +467,7 @@ function NewSubscriptionModal(props: Props) {
<Button
name={undefined}
onClick={handleFormSubmit}
disabled={isNotDefined(value.name) && loadingSubscription}
disabled={pristine || loadingSubscription}
>
{strings.createNewSubscription}
</Button>
Expand Down Expand Up @@ -552,7 +553,6 @@ function NewSubscriptionModal(props: Props) {
value={value.filterAlertAdmin1s}
onChange={setFieldValue}
error={getErrorString(fieldError?.filterAlertAdmin1s)}
withAsterisk
/>
</div>
<Checkbox
Expand Down

0 comments on commit 3ec6212

Please sign in to comment.