-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65452c3
commit 58879ad
Showing
8 changed files
with
69 additions
and
187 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
frontend/src/utils/firearms-utils/get-next-route-after-result.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 21 additions & 55 deletions
76
frontend/src/views/GuideSecuringFirearm/SecuringFooter.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,32 @@ | ||
<script lang="ts" setup> | ||
import type { RouteLocationRaw } from 'vue-router' | ||
const props = defineProps<{ | ||
backTo: RouteLocationRaw | ||
nextTo: RouteLocationRaw | ||
onBackClick:() => void | ||
onNextClick:() => void | ||
nextDisabled: boolean | ||
defineProps<{ | ||
onBackClick?:() => void | ||
onNextClick?:() => void | ||
nextDisabled?: boolean | ||
}>() | ||
const nextClick = (navigate: () => void) => { | ||
if (props.onNextClick) { | ||
props.onNextClick() | ||
} | ||
navigate() | ||
} | ||
const backClick = (navigate: () => void) => { | ||
if (props.onBackClick) { | ||
props.onBackClick() | ||
} | ||
navigate() | ||
} | ||
</script> | ||
|
||
<template> | ||
<div class="footer"> | ||
<div class="fr-col-11 fr-col-lg-6 footer-actions mx-auto"> | ||
<RouterLink | ||
v-slot="{ navigate }" | ||
class="m-1" | ||
:to="backTo" | ||
> | ||
<DsfrButton | ||
class="flex justify-center !w-full" | ||
icon="ri-arrow-left-line" | ||
:secondary="true" | ||
label="Précédent" | ||
@click.stop.prevent="backClick(navigate)" | ||
/> | ||
</RouterLink> | ||
<RouterLink | ||
v-slot="{ navigate }" | ||
class="m-1" | ||
:to="nextTo" | ||
> | ||
<DsfrButton | ||
class="flex justify-center !w-full" | ||
icon="ri-arrow-right-line" | ||
:disabled="nextDisabled" | ||
data-testid="button-next" | ||
label="Suivant" | ||
:icon-right="true" | ||
@click.stop.prevent="nextClick(navigate)" | ||
/> | ||
</RouterLink> | ||
<div class="fr-col-12 fr-col-lg-6 footer-actions mx-auto"> | ||
<DsfrButton | ||
class="flex justify-center !w-full" | ||
icon="ri-arrow-left-line" | ||
:secondary="true" | ||
label="Précédent" | ||
@click="onBackClick" | ||
/> | ||
<DsfrButton | ||
class="flex justify-center !w-full" | ||
icon="ri-arrow-right-line" | ||
:disabled="nextDisabled" | ||
data-testid="button-next" | ||
label="Suivant" | ||
:icon-right="true" | ||
@click="onNextClick" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.footer a { | ||
width: 50%; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters