diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 3af37575c..9270395b3 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1315,3 +1315,8 @@ INSERT INTO `postgresql`.`calendar_employee` (`business_id`, `calendar_state_id` (107, 2, DATE_ADD(CURDATE(), INTERVAL -10 DAY)), (107, 1, DATE_ADD(CURDATE(), INTERVAL -12 DAY)), (107, 2, DATE_ADD(CURDATE(), INTERVAL -20 DAY)); + +INSERT INTO `vn`.`smsConfig` (`id`, `uri`, `user`, `password`, `title`) + VALUES + ('1', 'https://websms.xtratelecom.es/api_php/server.wsdl', 'VERDINATURA', '182wbOKu', 'Verdnatura'); + diff --git a/front/core/components/calendar/index.html b/front/core/components/calendar/index.html index 110be3d78..e505bfad9 100644 --- a/front/core/components/calendar/index.html +++ b/front/core/components/calendar/index.html @@ -10,8 +10,8 @@ - {{$ctrl.defaultDate | dateTime: 'MMMM'}} - {{$ctrl.defaultDate | dateTime: 'yyyy'}} + {{$ctrl.defaultDate | date: 'MMMM'}} + {{$ctrl.defaultDate | date: 'yyyy'}} @@ -23,69 +23,41 @@ - - - - -
- L -
-
- M -
-
- X -
-
- J -
-
- V -
-
- S -
-
- D -
-
- -
- - {{::day.dated | date: 'd'}} - - {{::day.dated | date: 'd'}} -
-
-
- -
+ + + +
+ L +
+
+ M +
+
+ X +
+
+ J +
+
+ V +
+
+ S +
+
+ D +
+
+ +
+ + {{::day.dated | date: 'd'}} + + {{::day.dated | date: 'd'}} +
+
+
\ No newline at end of file diff --git a/front/core/components/calendar/index.spec.js b/front/core/components/calendar/index.spec.js index 94ba8134a..6a082a236 100644 --- a/front/core/components/calendar/index.spec.js +++ b/front/core/components/calendar/index.spec.js @@ -1,4 +1,4 @@ -fdescribe('Component vnCalendar', () => { +describe('Component vnCalendar', () => { let controller; let $element; @@ -14,12 +14,12 @@ fdescribe('Component vnCalendar', () => { $element.remove(); }); - describe('events() setter', () => { + describe('data() setter', () => { it(`should set an array of events and convert string dates to string object, then call repaint() method`, () => { spyOn(controller, 'repaint'); let currentDate = new Date().toString(); - controller.events = [ + controller.data = [ {dated: currentDate, title: 'Event 1'}, {dated: currentDate, title: 'Event 2'}, ]; @@ -30,8 +30,7 @@ fdescribe('Component vnCalendar', () => { }); describe('addEvent()', () => { - it(`should add an event to an array of events, then call repaint() method`, () => { - spyOn(controller, 'repaint'); + it(`should add an event to an array of events`, () => { controller.events = []; controller.addEvent({ dated: new Date(), @@ -43,13 +42,13 @@ fdescribe('Component vnCalendar', () => { expect(firstEvent.title).toEqual('My event'); expect(firstEvent.isRemovable).toBeDefined(); expect(firstEvent.isRemovable).toBeTruthy(); - expect(controller.repaint).toHaveBeenCalledWith(); }); - it(`should not repeat an event for the same date, should not call repaint() method`, () => { - spyOn(controller, 'repaint'); + it(`should not repeat an event for the same date`, () => { const curDate = new Date(); - controller._events = [{ + curDate.setHours(0, 0, 0, 0); + + controller.events = [{ dated: curDate, title: 'My event 1', className: 'color' @@ -64,13 +63,11 @@ fdescribe('Component vnCalendar', () => { expect(controller.events.length).toEqual(1); expect(firstEvent.title).toEqual('My event 1'); - expect(controller.repaint).not.toHaveBeenCalledWith(); }); }); describe('removeEvent()', () => { - it(`should remove an event from an array of events, then call repaint() method`, () => { - spyOn(controller, 'repaint'); + it(`should remove an event from an array of events`, () => { const curDate = new Date(); controller._events = [{ dated: curDate, @@ -80,7 +77,6 @@ fdescribe('Component vnCalendar', () => { controller.removeEvent(curDate); expect(controller.events.length).toEqual(0); - expect(controller.repaint).toHaveBeenCalledWith(); }); }); diff --git a/front/core/styles/salixfont.ttf b/front/core/styles/salixfont.ttf index c7057654d..7729fcd05 100644 Binary files a/front/core/styles/salixfont.ttf and b/front/core/styles/salixfont.ttf differ diff --git a/front/core/styles/salixfont.woff b/front/core/styles/salixfont.woff index f3bdd62f0..a1e0ece17 100644 Binary files a/front/core/styles/salixfont.woff and b/front/core/styles/salixfont.woff differ diff --git a/loopback/locale/es.json b/loopback/locale/es.json index f8c08591c..a902fc6cf 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -76,5 +76,6 @@ "You cannot remove this department": "No puedes eliminar este departamento", "The extension must be unique": "La extensión debe ser unica", "The secret can't be blank": "La contraseña no puede estar en blanco", - "EXTENSION_INVALID_FORMAT": "La extensión es invalida" + "EXTENSION_INVALID_FORMAT": "La extensión es invalida", + "We weren't able to send this SMS": "No hemos podido enviar el SMS" } \ No newline at end of file diff --git a/modules/item/front/routes.json b/modules/item/front/routes.json index ec90aa2ba..7aeeb2762 100644 --- a/modules/item/front/routes.json +++ b/modules/item/front/routes.json @@ -57,7 +57,7 @@ "params": { "item-tags": "$ctrl.itemTags" }, - "acl": ["buyer"] + "acl": ["buyer", "accessory"] }, { "url" : "/tax", "state": "item.card.tax", diff --git a/modules/item/front/tags/index.html b/modules/item/front/tags/index.html index 8daae462a..ad50ebe64 100644 --- a/modules/item/front/tags/index.html +++ b/modules/item/front/tags/index.html @@ -31,7 +31,6 @@ data="tags" on-change="$ctrl.getSourceTable(tag)" show-field="name" - vn-acl="buyer" vn-focus> + rule="itemTag.value"> + value-field="{{$ctrl.sourceTables[itemTag.id].field}}"> + rule="itemTag.priority">