3977-invoiceIn.tax #969
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#969
Loading…
Reference in New Issue
No description provided.
Delete Branch "3977-invoiceIn.tax"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -35,1 +35,4 @@
<tpl-item>{{id}}: {{name}}</tpl-item>
<append>
<vn-icon-button
vn-tooltip="Create expence"
you have a typo in expence, it is expense
@ -100,0 +110,4 @@
vn-id="createExpense"
on-accept="$ctrl.onResponse()">
<tpl-body>
<section class="SMSDialog">
SMSdialog?
@ -100,0 +117,4 @@
vn-id="code"
label="Code"
ng-model="$ctrl.expence.code"
required="true">
shouldn't this one be the focused input?
@ -28,1 +29,4 @@
}
onResponse() {
if (!this.expence)
expense
@ -29,0 +31,4 @@
onResponse() {
if (!this.expence)
throw new UserError(`The fields can't be empty`);
else if (!this.expence.code)
if the code inside the conditional throws, there's no point using "else if"
@ -29,0 +36,4 @@
else if (!this.expence.description)
throw new UserError(`The description can't be empty`);
const params = [];
if you are creating a data entity to send on a query, why would you call it params and why woulnd't you defined it as follows:
const data = [{
id: this.expence.code,
isWithheld: this.expence.isWithheld,
name: this.expence.description
}]
@ -56,2 +59,4 @@
});
});
describe('onResponse()', () => {
there's only 1 test for the onResponse function but there are about 4 use cases for this function, 3 thrown errors and un success query. Some tests are missing
@ -58,0 +61,4 @@
describe('onResponse()', () => {
it('should return success message', () => {
controller.expence = {
expense
@ -0,0 +1,6 @@
Create expence: Crear gasto
expense
LGTM