Skip to content

Commit

Permalink
Added show notification, removed Close Alert
Browse files Browse the repository at this point in the history
  • Loading branch information
m-axii committed Nov 9, 2023
1 parent 047a191 commit 8abbdce
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,29 @@
<div :class="$style['c-selfExclusion']">
<f-card
has-inner-spacing-large
card-size-custom="medium"
card-size-custom="large"
has-outline
:card-heading="$t('heading')"
:class="$style['c-selfExclusion-card-component']">
<!-- Success/Error alerts -->
<f-alert
v-if="isOpenAlertSuccess"
type="success"
:heading="$t('alcoholicItemsAlertSuccess.heading')">
:heading="$t('alcoholicItemsAlertSuccess.heading')"
is-dismissible>
{{ selectedState === 'temporaryExclusion'
? $t('alcoholicItemsAlertSuccess.text1Temporary')
: $t('alcoholicItemsAlertSuccess.text1Permanent') }}

<p>{{ $t('alcoholicItemsAlertSuccess.text2') }}</p>
<div :class="$style['c-buttons']">
<f-button
action-type="reset"
button-type="primary"
button-size="small-productive"
@click="closeAlertSuccess"
>
{{ $t('buttons.cancel') }}
</f-button>
</div>
</f-alert>

<f-alert
v-if="isOpenAlertError"
type="danger"
:heading="$t('alcoholicItemsAlertError.heading')">
:heading="$t('alcoholicItemsAlertError.heading')"
is-dismissible>
{{ $t('alcoholicItemsAlertError.text1') }}
<div :class="$style['c-buttons']">
<f-button
action-type="reset"
button-type="primary"
button-size="small-productive"
@click="closeAlertError"
>
{{ $t('buttons.cancel') }}
</f-button>
</div>
</f-alert>

<p :class="$style['c-selfExclusion-details']">
Expand Down Expand Up @@ -107,7 +89,7 @@
<f-button
action-type="reset"
button-type="ghost"
button-size="small-productive"
button-size="small"
@click="closeAlertConfirmation"
>
{{ $t('buttons.cancel') }}
Expand All @@ -116,13 +98,22 @@
<f-button
action-type="submit"
button-type="primary"
button-size="small-productive"
button-size="small"
@click="submitExclusionStatus"
>
{{ $t('buttons.excludeAlcohol') }}
</f-button>
</div>
</f-alert>

<f-alert
v-if="selectedState === ''"
type="success"
heading="Success"
is-dismissible
>
{{ $t('alcoholSelfExclusionConfirmation.text1Show') }}
</f-alert>
</div>
</f-card>
</div>
Expand Down Expand Up @@ -279,19 +270,11 @@ export default {
this.isOpenAlertSuccess = true;
},
closeAlertSuccess () {
this.isOpenAlertSuccess = false;
},
openAlertError () {
this.closeAllAlerts();
this.isOpenAlertError = true;
},
closeAlertError () {
this.isOpenAlertError = false;
},
openAlertConfirmation () {
this.closeAllAlerts();
this.isOpenAlertConfirmation = true;
Expand All @@ -303,8 +286,6 @@ export default {
closeAllAlerts () {
this.closeAlertConfirmation();
this.closeAlertSuccess();
this.closeAlertError();
}
}
};
Expand All @@ -313,8 +294,11 @@ export default {
<style lang="scss" module>
@use "@justeat/fozzie/src/scss/fozzie" as f;
.c-selfExclusion-card-component {
.c-selfExclusion-card-component > div {
position: relative;
display: flex;
flex-direction: column;
align-items: stretch;
}
.c-selfExclusion-title {
Expand Down Expand Up @@ -348,6 +332,14 @@ export default {
bottom: f.spacing(f);
left: f.spacing(d);
right: f.spacing(d);
@include f.media('<mid') {
position: relative;
bottom: 0;
left: 0;
right: 0;
margin-top: auto;
}
}
.c-buttons {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const messages = {
option3: 'Exclude alcoholic beverages permanently'
},
alcoholSelfExclusionConfirmation: {
text1Show: 'We’ll show alcohol items.',
text1Temporary: 'You can opt out of seeing alcoholic items on menus for a period of six months. This change can take up to 24 hours to take effect.',
text1Permanent: 'You can opt out of seeing alcoholic items on menus. This change can take up to 24 hours to take effect.',
privacyStatementLinkText: 'All personal data is processed in accordance with this privacy statement.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const messages = {
option3: 'Exclude alcoholic beverages permanently'
},
alcoholSelfExclusionConfirmation: {
text1Show: 'We’ll show alcohol items.',
text1Temporary: 'You can opt out of seeing alcoholic items on menus for a period of six months. This change can take up to 24 hours to take effect.',
text1Permanent: 'You can opt out of seeing alcoholic items on menus. This change can take up to 24 hours to take effect.',
privacyStatementLinkText: 'All personal data is processed in accordance with this privacy statement.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const messages = {
option3: 'Exclude alcoholic beverages permanently'
},
alcoholSelfExclusionConfirmation: {
text1Show: 'We’ll show alcohol items.',
text1Temporary: 'You can opt out of seeing alcoholic items on menus for a period of six months. This change can take up to 24 hours to take effect.',
text1Permanent: 'You can opt out of seeing alcoholic items on menus. This change can take up to 24 hours to take effect.',
privacyStatementLinkText: 'All personal data is processed in accordance with this privacy statement.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const messages = {
option3: 'Exclude alcoholic beverages permanently'
},
alcoholSelfExclusionConfirmation: {
text1Show: 'We’ll show alcohol items.',
text1Temporary: 'You can opt out of seeing alcoholic items on menus for a period of six months. This change can take up to 24 hours to take effect.',
text1Permanent: 'You can opt out of seeing alcoholic items on menus. This change can take up to 24 hours to take effect.',
privacyStatementLinkText: 'All personal data is processed in accordance with this privacy statement.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const messages = {
option3: 'Exclude alcoholic beverages permanently'
},
alcoholSelfExclusionConfirmation: {
text1Show: 'We’ll show alcohol items.',
text1Temporary: 'You can opt out of seeing alcoholic items on menus for a period of six months. This change can take up to 24 hours to take effect.',
text1Permanent: 'You can opt out of seeing alcoholic items on menus. This change can take up to 24 hours to take effect.',
privacyStatementLinkText: 'All personal data is processed in accordance with this privacy statement.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const messages = {
option3: 'Exclude alcoholic beverages permanently'
},
alcoholSelfExclusionConfirmation: {
text1Show: 'We’ll show alcohol items.',
text1Temporary: 'You can opt out of seeing alcoholic items on menus for a period of six months. This change can take up to 24 hours to take effect.',
text1Permanent: 'You can opt out of seeing alcoholic items on menus. This change can take up to 24 hours to take effect.',
privacyStatementLinkText: 'All personal data is processed in accordance with this privacy statement.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const messages = {
option3: 'Exclude alcoholic beverages permanently'
},
alcoholSelfExclusionConfirmation: {
text1Show: 'We’ll show alcohol items.',
text1Temporary: 'You can opt out of seeing alcoholic items on menus for a period of six months. This change can take up to 24 hours to take effect.',
text1Permanent: 'You can opt out of seeing alcoholic items on menus. This change can take up to 24 hours to take effect.',
privacyStatementLinkText: 'All personal data is processed in accordance with this privacy statement.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const messages = {
option3: 'Exclude alcoholic beverages permanently'
},
alcoholSelfExclusionConfirmation: {
text1Show: 'We’ll show alcohol items.',
text1Temporary: 'You can opt out of seeing alcoholic items on menus for a period of six months. This change can take up to 24 hours to take effect.',
text1Permanent: 'You can opt out of seeing alcoholic items on menus. This change can take up to 24 hours to take effect.',
privacyStatementLinkText: 'All personal data is processed in accordance with this privacy statement.',
Expand Down

0 comments on commit 8abbdce

Please sign in to comment.