refactoe issues

This commit is contained in:
Jay Makwana
2020-05-12 21:11:36 +05:30
parent d4a1f1a784
commit 96187870b4
8 changed files with 76 additions and 8 deletions

View File

@ -9,7 +9,7 @@
:readonly="readOnly"
:name="name"
:tabindex="tabIndex"
:class="[{'input-field-left-icon': icon && isAlignLeftIcon ,'input-field-right-icon': icon && !isAlignLeftIcon ,'invalid': isFieldValid, 'disabled': disabled, 'small-input': small}, inputClass]"
:class="[{ 'input-field-left-icon': icon && isAlignLeftIcon, 'input-field-right-icon': (icon && !isAlignLeftIcon) || isInputGroup, invalid: isFieldValid, disabled: disabled, 'small-input': small}, inputClass]"
:placeholder="placeholder"
:autocomplete="autocomplete"
class="input-field"
@ -23,6 +23,9 @@
<font-awesome-icon :icon="!showPass ?'eye': 'eye-slash'" class="right-icon" />
</div>
<font-awesome-icon v-if="icon && !isAlignLeftIcon" :icon="icon" class="right-icon" />
<span v-if="isInputGroup" class="right-input-group-text">
{{ inputGroupText }}
</span>
</div>
</template>
@ -84,6 +87,14 @@ export default {
showPassword: {
type: Boolean,
default: false
},
isInputGroup: {
type: Boolean,
default: false,
},
inputGroupText: {
type: String,
default: null,
}
},
data () {

View File

@ -678,6 +678,7 @@
"payment_setting_updated": "Payment Setting updated successfully",
"payment_mode": "Payment Mode",
"add_payment_mode": "Add Payment Mode",
"edit_payment_mode": "Edit Payment Mode",
"mode_name": "Mode Name",
"payment_mode_added": "Payment Mode Added",
"payment_mode_updated": "Payment Mode Updated",
@ -690,6 +691,7 @@
"title": "Items",
"units": "units",
"add_item_unit": "Add Item Unit",
"edit_item_unit": "Edit Item Unit",
"unit_name": "Unit Name",
"item_unit_added": "Item Unit Added",
"item_unit_updated": "Item Unit Updated",
@ -730,6 +732,7 @@
"tax_types": {
"title": "Tax Types",
"add_tax": "Add Tax",
"edit_tax": "Edit Tax",
"description": "You can add or Remove Taxes as you please. Crater supports Taxes on Individual Items as well as on the invoice.",
"add_new_tax": "Add New Tax",
"tax_settings": "Tax Settings",

View File

@ -17,11 +17,17 @@
"save": "Salvar",
"cancel": "Cancelar",
"update": "Atualizar",
"deselect": "Desmarcar",
"download": "Baixar",
"from_date": "A partir da Data",
"to_date": "Até a Data",
"from": "De",
"to": "Para",
"sort_by": "Ordenar por",
"ascending": "Crescente",
"descending": "Descendente",
"subject": "Sujeita",
"message": "Mensagem",
"go_back": "Voltar",
"back_to_login": "Voltar ao Login",
"home": "Home",
@ -180,7 +186,7 @@
"no_items": "Ainda não existe itens",
"list_of_items": "Esta seção conterá a lista de itens.",
"select_a_unit": "Seleciona unidade",
"taxes": "Impostos",
"item_attached_message": "Não é possível excluir um item que já está em uso.",
"confirm_delete": "Você não poderá recuperar este item | Você não poderá recuperar esses itens",
"created_message": "Item criado com sucesso",
@ -329,6 +335,9 @@
"no_matching_invoices": "Não há faturas correspondentes!",
"mark_as_sent_successfully": "Fatura marcada como enviada com sucesso",
"send_invoice_successfully": "Fatura enviada com sucesso",
"cloned_successfully": "Fatura clonada com sucesso",
"clone_invoice": "Clonar fatura",
"confirm_clone": "Esta fatura será clonada em uma nova fatura",
"item": {
"title": "Titulo do Item",
"description": "Descrição",
@ -394,6 +403,7 @@
"edit_payment": "Editar Pagamento",
"view_payment": "Ver Pagamento",
"add_new_payment": "Adicionar novo Pagamento",
"send_payment_receipt": "Enviar recibo de pagamento",
"save_payment": "Salvar Pagamento",
"update_payment": "Atualizar Pagamento",
"payment": "Pagamento | Pagamentos",
@ -659,7 +669,28 @@
"autogenerate_payment_number": "Gerar automaticamente número do Pagamento",
"payment_setting_description": "Desative isso, se você não deseja gerar automaticamente números do Pagamento sempre que criar um novo.",
"enter_payment_prefix": "Digite o Prefixo do Pagamento",
"payment_setting_updated": "Configurações de Pagamento atualizada com sucesso"
"payment_setting_updated": "Configurações de Pagamento atualizada com sucesso",
"payment_mode": "Modo de pagamento",
"add_payment_mode": "Adicionar modo de pagamento",
"edit_payment_mode": "Editar modo de pagamento",
"mode_name": "Nome do modo",
"payment_mode_added": "Modo de pagamento adicionado",
"payment_mode_updated": "Modo de pagamento atualizado",
"payment_mode_confirm_delete": "Você não poderá recuperar este modo de pagamento",
"already_in_use": "O modo de pagamento já está em uso",
"deleted_message": "Modo de pagamento excluído com sucesso"
},
"items": {
"title": "Itens",
"units": "unidades",
"add_item_unit": "Adicionar unidade de item",
"edit_item_unit": "Editar unidade de item",
"unit_name": "Nome da unidade",
"item_unit_added": "Item Unit Added",
"item_unit_updated": "Item Unit Updated",
"item_unit_confirm_delete": "Você não poderá recuperar esta unidade de item",
"already_in_use": "A unidade do item já está em uso",
"deleted_message": "Unidade de item excluída com sucesso"
}
},
"account_settings": {
@ -694,6 +725,7 @@
"tax_types": {
"title": "Tipos de Impostos",
"add_tax": "Adicionar Imposto",
"edit_tax": "Editar imposto",
"description": "Você pode adicionar ou remover impostos conforme desejar. O Crater suporta impostos sobre itens individuais e também na Fatura.",
"add_new_tax": "Adicionar Novo Imposto",
"tax_settings": "Configurações de Impostos",

View File

@ -38,6 +38,8 @@
<base-input
v-model="item.quantity"
:invalid="$v.item.quantity.$error"
:is-input-group="!!item.unit_name"
:input-group-text="item.unit_name"
type="text"
small
@keyup="updateItem"
@ -378,6 +380,7 @@ export default {
this.item.price = item.price
this.item.item_id = item.id
this.item.description = item.description
this.item.unit_name = item.unit_name
if (this.taxPerItem === 'YES' && item.taxes) {
let index = 0
item.taxes.forEach(tax => {

View File

@ -38,6 +38,8 @@
<base-input
v-model="item.quantity"
:invalid="$v.item.quantity.$error"
:is-input-group="!!item.unit_name"
:input-group-text="item.unit_name"
type="text"
small
@keyup="updateItem"
@ -379,6 +381,7 @@ export default {
this.item.price = item.price
this.item.item_id = item.id
this.item.description = item.description
this.item.unit_name = item.unit_name
if (this.taxPerItem === 'YES' && item.taxes) {
let index = 0
item.taxes.forEach(tax => {

View File

@ -403,14 +403,14 @@ export default {
},
async addItemUnit () {
this.openModal({
'title': 'Add Item Unit',
'title': this.$t('settings.customization.items.add_item_unit'),
'componentName': 'ItemUnit'
})
this.$refs.itemTable.refresh()
},
async editItemUnit (data) {
this.openModal({
'title': 'Edit Item Unit',
'title': this.$t('settings.customization.items.edit_item_unit'),
'componentName': 'ItemUnit',
'id': data.id,
'data': data
@ -439,14 +439,14 @@ export default {
},
async addPaymentMode () {
this.openModal({
'title': 'Add Payment Mode',
'title': this.$t('settings.customization.payments.add_payment_mode'),
'componentName': 'PaymentMode'
})
this.$refs.table.refresh()
},
async editPaymentMode (data) {
this.openModal({
'title': 'Edit Payment Mode',
'title': this.$t('settings.customization.payments.edit_payment_mode'),
'componentName': 'PaymentMode',
'id': data.id,
'data': data

View File

@ -183,7 +183,7 @@ export default {
async EditTax (id) {
let response = await this.fetchTaxType(id)
this.openModal({
'title': 'Edit Tax',
'title': this.$t('settings.tax_types.edit_tax'),
'componentName': 'TaxTypeModal',
'id': id,
'data': response.data.taxType

View File

@ -18,6 +18,22 @@
transform: translate(-50%,-50%);
}
.right-input-group-text {
position: absolute;
width: 13px;
height: 18px;
min-width: 18px;
color: $ls-color-gray;
font-style: normal;
font-weight: 900;
font-size: 14px;
line-height: 16px;
top: 50%;
right: 0px;
z-index: 1;
transform: translate(-50%, -50%);
}
.right-icon {
position: absolute;
width: 13px;