feat: add button

This commit is contained in:
Methapon2001 2024-08-09 17:58:35 +07:00
parent d1afb438ea
commit 99fd73e4c5

View file

@ -562,60 +562,43 @@ watch(
</script> </script>
<template> <template>
<ButtonAddComponent style="z-index: 999"> <ButtonAddComponent
<div v-if="$route.name === 'CustomerManagement'"> style="z-index: 999"
<q-fab-action v-if="$route.name === 'CustomerManagement'"
v-if="currentTab === 'employer'" >
id="add-customer-legal-entity" <q-fab-action
style="color: white; background-color: hsla(var(--violet-11-hsl))" v-if="currentTab === 'employer'"
@click="createCustomerForm('CORP')" id="add-customer-legal-entity"
padding="xs" style="color: white; background-color: hsla(var(--violet-11-hsl))"
icon="mdi-office-building-outline" @click="createCustomerForm('CORP')"
:label="$t('add') + ' ' + $t('customerLegalEntity')" padding="xs"
external-label icon="mdi-office-building-outline"
label-position="left" :label="$t('add') + ' ' + $t('customerLegalEntity')"
/> external-label
<q-fab-action label-position="left"
v-if="currentTab === 'employer'" />
id="add-customer-natural-person" <q-fab-action
:label="$t('add') + ' ' + $t('customerNaturalPerson')" v-if="currentTab === 'employer'"
external-label id="add-customer-natural-person"
label-position="left" :label="$t('add') + ' ' + $t('customerNaturalPerson')"
@click="createCustomerForm('PERS')" external-label
style="color: white; background-color: hsla(var(--teal-10-hsl))" label-position="left"
padding="xs" @click="createCustomerForm('PERS')"
icon="mdi-account-plus-outline" style="color: white; background-color: hsla(var(--teal-10-hsl))"
/> padding="xs"
<q-fab-action icon="mdi-account-plus-outline"
v-if="currentTab === 'employee'" />
:label="$t('add') + ' ' + $t('EMPLOYEE')" <q-fab-action
external-label v-if="currentTab === 'employee'"
id="add-employee" :label="$t('add') + ' ' + $t('EMPLOYEE')"
label-position="left" external-label
@click="createEmployeeForm()" id="add-employee"
color="primary" label-position="left"
padding="xs" @click="createEmployeeForm()"
icon="mdi-account-plus-outline" color="primary"
/> padding="xs"
</div> icon="mdi-account-plus-outline"
<div v-else> />
<q-fab-action
id="add-branch"
:style="{
color: 'white',
'background-color':
currentCustomer?.customerType === 'CORP'
? 'hsla(var(--violet-11-hsl))'
: 'hsla(var(--pink-6-hsl))',
}"
@click="console.log('add-branch')"
padding="xs"
icon="mdi-office-building-outline"
:label="$t('formDialogTitleCreateSubBranch')"
external-label
label-position="left"
/>
</div>
</ButtonAddComponent> </ButtonAddComponent>
<div class="column full-height no-wrap"> <div class="column full-height no-wrap">