replaced numeric fields with input-number #1138
This commit is contained in:
parent
462879a40b
commit
3df5f4cae9
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
},
|
||||
"extension": {
|
||||
"type": "String"
|
||||
"type": "Number"
|
||||
},
|
||||
"secret": {
|
||||
"type": "String"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
export default {
|
||||
vnTextfield: 'vn-textfield > div > div > div > input',
|
||||
vnInputNumber: 'vn-input-number > div > div > div > input',
|
||||
vnSubmit: 'vn-submit > input',
|
||||
vnFloatButton: 'vn-float-button > button'
|
||||
};
|
||||
|
|
|
@ -78,7 +78,7 @@ export default {
|
|||
clientPayMethod: {
|
||||
payMethodAutocomplete: `vn-autocomplete[field="$ctrl.client.payMethodFk"]`,
|
||||
IBANInput: `${components.vnTextfield}[name="iban"]`,
|
||||
dueDayInput: `${components.vnTextfield}[name="dueDay"]`,
|
||||
dueDayInput: `${components.vnInputNumber}[name="dueDay"]`,
|
||||
receivedCoreLCRCheckbox: `vn-check[label='Received LCR'] md-checkbox`,
|
||||
receivedCoreVNLCheckbox: `vn-check[label='Received core VNL'] md-checkbox`,
|
||||
receivedB2BVNLCheckbox: `vn-check[label='Received B2B VNL'] md-checkbox`,
|
||||
|
@ -132,13 +132,13 @@ export default {
|
|||
},
|
||||
clientCredit: {
|
||||
addCreditFloatButton: `${components.vnFloatButton}`,
|
||||
creditInput: `${components.vnTextfield}[name="credit"]`,
|
||||
creditInput: `${components.vnInputNumber}[name="credit"]`,
|
||||
saveButton: `${components.vnSubmit}`,
|
||||
firstCreditText: 'vn-client-credit-index vn-card > div vn-table vn-tbody > vn-tr'
|
||||
},
|
||||
clientGreuge: {
|
||||
addGreugeFloatButton: `${components.vnFloatButton}`,
|
||||
amountInput: `${components.vnTextfield}[name="amount"]`,
|
||||
amountInput: `${components.vnInputNumber}[name="amount"]`,
|
||||
descriptionInput: `${components.vnTextfield}[name="description"]`,
|
||||
typeAutocomplete: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"]`,
|
||||
saveButton: `${components.vnSubmit}`,
|
||||
|
@ -162,7 +162,7 @@ export default {
|
|||
companyAutocomplete: 'vn-client-risk-index vn-autocomplete[field="$ctrl.companyFk"]',
|
||||
newPaymentButton: `${components.vnFloatButton}`,
|
||||
newPaymentBankInut: `vn-client-risk-create vn-textfield[field="$ctrl.receipt.bankFk"] input`,
|
||||
newPaymentAmountInput: `vn-client-risk-create vn-textfield[field="$ctrl.receipt.amountPaid"] input`,
|
||||
newPaymentAmountInput: `vn-client-risk-create vn-input-number[field="$ctrl.receipt.amountPaid"] input`,
|
||||
saveButton: `vn-client-risk-create vn-button[label="Save"]`,
|
||||
firstRiskLineBalance: 'vn-client-risk-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)'
|
||||
|
||||
|
@ -223,7 +223,7 @@ export default {
|
|||
typeAutocomplete: `vn-autocomplete[field="$ctrl.item.typeFk"]`,
|
||||
intrastatAutocomplete: `vn-autocomplete[field="$ctrl.item.intrastatFk"]`,
|
||||
nameInput: `vn-textfield[label="Name"] input`,
|
||||
relevancyInput: `vn-textfield[label="Relevancy"] input`,
|
||||
relevancyInput: `vn-input-number[label="Relevancy"] input`,
|
||||
originAutocomplete: `vn-autocomplete[field="$ctrl.item.originFk"]`,
|
||||
expenceAutocomplete: `vn-autocomplete[field="$ctrl.item.expenceFk"]`,
|
||||
longNameInput: `vn-textfield[field="$ctrl.item.longName"] input`,
|
||||
|
@ -356,7 +356,7 @@ export default {
|
|||
ticketPackages: {
|
||||
packagesButton: `vn-left-menu a[ui-sref="ticket.card.package.index"]`,
|
||||
firstPackageAutocomplete: `vn-autocomplete[label="Package"]`,
|
||||
firstQuantityInput: `vn-textfield[label="Quantity"] input`,
|
||||
firstQuantityInput: `vn-input-number[label="Quantity"] input`,
|
||||
firstRemovePackageButton: `vn-icon-button[vn-tooltip="Remove package"]`,
|
||||
addPackageButton: `vn-icon-button[vn-tooltip="Add package"]`,
|
||||
clearPackageAutocompleteButton: `vn-autocomplete[label="Package"] > div > div > div > vn-icon > i`,
|
||||
|
@ -440,8 +440,8 @@ export default {
|
|||
request: 'vn-ticket-request-index > form > vn-card > div > vn-horizontal > vn-table > div > vn-tbody > vn-tr',
|
||||
descriptionInput: `vn-ticket-request-create > form > div > vn-card > div > vn-horizontal:nth-child(1) > vn-textfield > div > div > div.infix > input`,
|
||||
atenderAutocomplete: `vn-ticket-request-create vn-autocomplete[field="$ctrl.ticketRequest.atenderFk"]`,
|
||||
quantityInput: `vn-ticket-request-create > form > div > vn-card > div > vn-horizontal:nth-child(2) > vn-textfield:nth-child(1) > div > div > div.infix > input`,
|
||||
priceInput: `vn-ticket-request-create > form > div > vn-card > div > vn-horizontal:nth-child(2) > vn-textfield:nth-child(2) > div > div > div.infix > input`,
|
||||
quantityInput: `vn-ticket-request-create > form > div > vn-card > div > vn-horizontal:nth-child(2) > vn-input-number:nth-child(1) > div > div > div.infix > input`,
|
||||
priceInput: `vn-ticket-request-create > form > div > vn-card > div > vn-horizontal:nth-child(2) > vn-input-number:nth-child(2) > div > div > div.infix > input`,
|
||||
firstRemoveRequestButton: `vn-ticket-request-index vn-icon[icon="delete"]:nth-child(1)`,
|
||||
saveButton: `vn-ticket-request-create > form > div > vn-button-bar > vn-submit[label="Create"] input`,
|
||||
firstDescription: 'vn-ticket-request-index > form > vn-card > div > vn-horizontal > vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(2)',
|
||||
|
@ -456,7 +456,7 @@ export default {
|
|||
ticketService: {
|
||||
addServiceButton: 'vn-ticket-service > form > vn-card > div > vn-one:nth-child(3) > vn-icon-button > button > vn-icon',
|
||||
firstDescriptionInput: 'vn-ticket-service vn-textfield[label="Description"] input',
|
||||
firstQuantityInput: 'vn-ticket-service vn-textfield[label="Quantity"] input',
|
||||
firstQuantityInput: 'vn-ticket-service vn-input-number[label="Quantity"] input',
|
||||
firstPriceInput: 'vn-ticket-service vn-input-number[label="Price"] input',
|
||||
firstVatTypeAutocomplete: 'vn-ticket-service vn-autocomplete[label="Tax class"]',
|
||||
fistDeleteServiceButton: 'vn-ticket-card > vn-main-block > div.content-block.ng-scope > vn-ticket-service > form > vn-card > div > vn-one:nth-child(1) > vn-horizontal:nth-child(1) > vn-auto > vn-icon-button[icon="delete"]',
|
||||
|
@ -485,7 +485,7 @@ export default {
|
|||
addItemButton: `vn-claim-detail a vn-float-button`,
|
||||
firstClaimableSaleFromTicket: 'vn-claim-detail > vn-dialog vn-tbody > vn-tr',
|
||||
claimDetailLine: 'vn-claim-detail > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr',
|
||||
secondItemQuantityInput: 'vn-claim-detail vn-tr:nth-child(2) vn-textfield[model="saleClaimed.quantity"] input',
|
||||
secondItemQuantityInput: 'vn-claim-detail vn-tr:nth-child(2) vn-input-number[model="saleClaimed.quantity"] input',
|
||||
totalClaimed: 'vn-claim-detail > vn-vertical > vn-card > div > vn-vertical > vn-horizontal > div > vn-label-value:nth-child(2) > section > span',
|
||||
secondItemDeleteButton: 'vn-claim-detail > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(9) > vn-icon-button > button > vn-icon > i'
|
||||
},
|
||||
|
@ -548,7 +548,7 @@ export default {
|
|||
confirmButton: 'vn-order-line > vn-confirm button[response="ACCEPT"]',
|
||||
},
|
||||
workerPbx: {
|
||||
extensionInput: 'vn-worker-pbx vn-textfield[model="$ctrl.worker.sip.extension"] input',
|
||||
extensionInput: 'vn-worker-pbx vn-input-number[model="$ctrl.worker.sip.extension"] input',
|
||||
passwordInput: 'vn-worker-pbx vn-textfield[model="$ctrl.worker.sip.secret"] input',
|
||||
saveButton: 'vn-worker-pbx vn-submit[label="Save"] input'
|
||||
},
|
||||
|
|
|
@ -29,6 +29,7 @@ describe('Claim detail', () => {
|
|||
|
||||
it('should edit de second item claimed quantity', async() => {
|
||||
const result = await nightmare
|
||||
.clearInput(selectors.claimDetail.secondItemQuantityInput)
|
||||
.write(selectors.claimDetail.secondItemQuantityInput, 10)
|
||||
.write('body', '\u000d') // simulates enter
|
||||
.waitForLastSnackbar();
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
type="number"
|
||||
name="{{::$ctrl.name}}"
|
||||
ng-model="$ctrl.value"
|
||||
vn-validation="{{$ctrl.rule}}"
|
||||
ng-disabled="$ctrl.disabled"
|
||||
ng-readonly="$ctrl.readonly"
|
||||
ng-focus="$ctrl.hasFocus = true"
|
||||
|
|
|
@ -90,6 +90,7 @@ ngModule.component('vnInputNumber', {
|
|||
controller: InputNumber,
|
||||
bindings: {
|
||||
label: '@?',
|
||||
name: '@?',
|
||||
disabled: '<?',
|
||||
min: '<?',
|
||||
max: '<?',
|
||||
|
|
|
@ -45,12 +45,11 @@
|
|||
<vn-td center>{{::saleClaimed.sale.ticket.landed | dateTime:'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-td number>{{::saleClaimed.sale.quantity}}</vn-td>
|
||||
<vn-td>
|
||||
<vn-textfield
|
||||
vn-focus
|
||||
<vn-input-number vn-focus min="0" step="1"
|
||||
model="saleClaimed.quantity"
|
||||
on-change="$ctrl.setClaimedQuantity(saleClaimed.id, saleClaimed.quantity)"
|
||||
type="text">
|
||||
</vn-textfield>
|
||||
display-controls="false"
|
||||
on-change="$ctrl.setClaimedQuantity(saleClaimed.id, saleClaimed.quantity)">
|
||||
</vn-input-number>
|
||||
</vn-td>
|
||||
<vn-td expand>{{::saleClaimed.sale.concept}}</vn-td>
|
||||
<vn-td number>{{::saleClaimed.sale.price | currency: 'EUR':2}}</vn-td>
|
||||
|
|
|
@ -17,12 +17,11 @@
|
|||
fields="['ibanRequired']"
|
||||
initial-data="$ctrl.client.payMethod">
|
||||
</vn-autocomplete>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
<vn-input-number vn-one min="0" step="1"
|
||||
label="Due day"
|
||||
field="$ctrl.client.dueDay"
|
||||
vn-acl="salesAssistant">
|
||||
</vn-textfield>
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
<vn-input-number vn-one min="1"
|
||||
display-controls="false"
|
||||
label="Credit"
|
||||
model="$ctrl.creditClassification.credit",
|
||||
rule="creditInsurance.credit"
|
||||
step="1"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
</vn-input-number>
|
||||
<vn-input-number vn-one min="0" step="1"
|
||||
display-controls="false"
|
||||
label="Grade"
|
||||
model="$ctrl.creditClassification.grade"
|
||||
rule="CreditInsurance.grade">
|
||||
</vn-textfield>
|
||||
</vn-input-number>
|
||||
<vn-date-picker
|
||||
vn-one
|
||||
label="Since"
|
||||
|
|
|
@ -8,15 +8,13 @@
|
|||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
margin-medium-right
|
||||
<vn-input-number vn-one min="0"
|
||||
display-controls="false"
|
||||
label="Credit"
|
||||
model="$ctrl.insurance.credit",
|
||||
rule="CreditInsurance.credit"
|
||||
step="1"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
</vn-input-number>
|
||||
<vn-date-picker vn-one
|
||||
label="Date"
|
||||
model="$ctrl.insurance.created"
|
||||
|
@ -24,13 +22,12 @@
|
|||
</vn-date-picker>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
argin-medium-right
|
||||
<vn-input-number vn-one min="0" step="1"
|
||||
display-controls="false"
|
||||
label="Grade"
|
||||
model="$ctrl.insurance.grade"
|
||||
rule="CreditInsurance.grade">
|
||||
</vn-textfield>
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Credit" field="$ctrl.client.credit" type="number" vn-focus></vn-textfield>
|
||||
<vn-input-number vn-one min="0" vn-focus
|
||||
display-controls="false"
|
||||
label="Credit"
|
||||
field="$ctrl.client.credit">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
|
|
|
@ -8,14 +8,11 @@
|
|||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
margin-medium-right
|
||||
<vn-input-number vn-one vn-focus min="0"
|
||||
display-controls="false"
|
||||
label="Amount"
|
||||
field="$ctrl.greuge.amount"
|
||||
step="1"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
field="$ctrl.greuge.amount">
|
||||
</vn-input-number>
|
||||
<vn-date-picker vn-one
|
||||
label="Date"
|
||||
model="$ctrl.greuge.shipped"
|
||||
|
|
|
@ -21,12 +21,11 @@
|
|||
model="$ctrl.recovery.finished"
|
||||
ini-options="{enableTime: true}">
|
||||
</vn-date-picker>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
<vn-input-number vn-one vn-focus
|
||||
display-controls="false"
|
||||
label="Amount"
|
||||
field="$ctrl.recovery.amount"
|
||||
type="number">
|
||||
</vn-textfield>
|
||||
field="$ctrl.recovery.amount">
|
||||
</vn-input-number>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
label="Period"
|
||||
|
|
|
@ -28,13 +28,11 @@
|
|||
label="Bank"
|
||||
field="$ctrl.receipt.bankFk">
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
margin-medium-right
|
||||
<vn-input-number vn-one vn-focus
|
||||
display-controls="false"
|
||||
label="Amount"
|
||||
field="$ctrl.receipt.amountPaid"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
field="$ctrl.receipt.amountPaid">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
</div>
|
||||
<vn-horizontal margin-medium class="buttons-bar">
|
||||
|
|
|
@ -62,13 +62,29 @@
|
|||
label="Reference"
|
||||
field="$ctrl.item.comment">
|
||||
</vn-textfield>
|
||||
<vn-textfield vn-one label="Size" field="$ctrl.item.size"></vn-textfield>
|
||||
<vn-textfield vn-one label="stems" field="$ctrl.item.stems"></vn-textfield>
|
||||
<vn-input-number vn-one min="0"
|
||||
display-controls="false"
|
||||
label="Size"
|
||||
field="$ctrl.item.size">
|
||||
</vn-input-number>
|
||||
<vn-input-number vn-one min="0"
|
||||
display-controls="false"
|
||||
label="stems"
|
||||
field="$ctrl.item.stems">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="density" field="$ctrl.item.density"></vn-textfield>
|
||||
<vn-input-number vn-one
|
||||
display-controls="false" min="0"
|
||||
label="Density"
|
||||
field="$ctrl.item.density">
|
||||
</vn-input-number>
|
||||
<!-- <vn-textfield vn-one label="compression" field="$ctrl.item.compression"></vn-textfield> -->
|
||||
<vn-textfield vn-one label="Relevancy" field="$ctrl.item.relevancy" type="number"></vn-textfield>
|
||||
<vn-input-number vn-one
|
||||
display-controls="false" min="0"
|
||||
label="Relevancy"
|
||||
field="$ctrl.item.relevancy">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-check
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<vn-input-number
|
||||
name="quantity"
|
||||
label="Qty."
|
||||
model="price.quantity"
|
||||
field="price.quantity"
|
||||
min="0"
|
||||
step="price.grouping"
|
||||
on-change="$ctrl.validate()">
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
field="package.packagingFk">
|
||||
<tpl-item>{{itemFk}} : {{name}}</tpl-item>
|
||||
</vn-autocomplete>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
<vn-input-number vn-one min="1" step="1"
|
||||
display-controls="false"
|
||||
label="Quantity"
|
||||
model="package.quantity"
|
||||
rule="TicketPackaging.quantity">
|
||||
</vn-textfield>
|
||||
</vn-input-number>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
label="Added"
|
||||
|
|
|
@ -22,8 +22,16 @@
|
|||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Quantity" field="$ctrl.ticketRequest.quantity"></vn-textfield>
|
||||
<vn-textfield vn-one label="Price" field="$ctrl.ticketRequest.price"></vn-textfield>
|
||||
<vn-input-number vn-one min="1"
|
||||
display-controls="false"
|
||||
label="Quantity"
|
||||
field="$ctrl.ticketRequest.quantity">
|
||||
</vn-input-number>
|
||||
<vn-input-number vn-one min="0"
|
||||
display-controls="false"
|
||||
label="Price"
|
||||
field="$ctrl.ticketRequest.price">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
|
|
|
@ -21,18 +21,15 @@
|
|||
model="service.description"
|
||||
rule="TicketService.description">
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
<vn-input-number vn-one min="0" step="1"
|
||||
label="Quantity"
|
||||
model="service.quantity"
|
||||
rule="TicketService.quantity">
|
||||
</vn-textfield>
|
||||
<vn-input-number
|
||||
vn-one
|
||||
step="1"
|
||||
</vn-input-number>
|
||||
<vn-input-number vn-one step="1"
|
||||
display-controls="false"
|
||||
label="Price"
|
||||
model="service.price"
|
||||
display-controls="false">
|
||||
model="service.price">
|
||||
</vn-input-number>
|
||||
<vn-autocomplete vn-one
|
||||
url="/api/TaxClasses"
|
||||
|
|
|
@ -9,11 +9,10 @@
|
|||
<vn-card pad-large>
|
||||
<vn-vertical>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
<vn-input-number vn-one min="1" step="1"
|
||||
label="Extension"
|
||||
model="$ctrl.worker.sip.extension">
|
||||
</vn-textfield>
|
||||
</vn-input-number>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
label="Password"
|
||||
|
|
Loading…
Reference in New Issue