Skip to content

Commit

Permalink
feat(ClientSelect): add no-option template with add client link
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Dec 17, 2024
1 parent c75e8b0 commit e85bbd5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions packages/app/src/components/client/ClientSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
>
<slot :scope="scope" :name="slot"></slot>
</template>
<template #no-option>
<q-item>
<q-item-section class="text-italic text-grey">
{{ lang.noResultsAvailable }}
<router-link to="/admin/clients">{{
lang.client.messages.addClient
}}</router-link>
</q-item-section>
</q-item>
</template>
</filtered-model-select>
</template>

Expand Down
4 changes: 3 additions & 1 deletion packages/app/src/lang/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const lang: Language = {
settings: 'Settings',
name: 'Name',
overview: 'Overview',
noResultsAvailable: 'No results available.',
account: {
title: 'Account',
name: 'Account',
Expand Down Expand Up @@ -97,7 +98,8 @@ const lang: Language = {
fieldRequired: 'Field is required'
},
messages: {
linkAccount: 'Link account to client.'
linkAccount: 'Link account to client.',
addClient: 'Add a client.'
}
},
invoice: {
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/lang/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface Language {
settings: string
name: string
overview: string
noResultsAvailable: string
account: {
title: string
name: string
Expand Down Expand Up @@ -97,6 +98,7 @@ export interface Language {
}
messages: {
linkAccount: string
addClient: string
}
}
invoice: {
Expand Down
4 changes: 3 additions & 1 deletion packages/app/src/lang/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const lang: Language = {
settings: 'Instellingen',
name: 'Naam',
overview: 'Overzicht',
noResultsAvailable: 'Geen resultaten beschikbaar.',
account: {
title: 'Account',
name: 'Account',
Expand Down Expand Up @@ -98,7 +99,8 @@ const lang: Language = {
fieldRequired: 'Veld is vereist'
},
messages: {
linkAccount: 'Link account aan klant.'
linkAccount: 'Link account aan klant.',
addClient: 'Voeg een klant toe.'
}
},
invoice: {
Expand Down

0 comments on commit e85bbd5

Please sign in to comment.