Merge branch 'test' of verdnatura/salix into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-12-17 12:34:51 +00:00 committed by Gitea
commit 3d83a08eca
10 changed files with 43 additions and 27 deletions

View File

@ -3,5 +3,8 @@
// Carácter predeterminado de final de línea. // Carácter predeterminado de final de línea.
"files.eol": "\n", "files.eol": "\n",
"vsicons.presets.angular": false, "vsicons.presets.angular": false,
"eslint.autoFixOnSave": true "eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
} }

View File

@ -253,7 +253,7 @@ export default class Autocomplete extends Field {
} }
showDropDown(search) { showDropDown(search) {
if (this.readonly) return; if (!this.editable) return;
this.assignDropdownProps(); this.assignDropdownProps();
this.$.dropDown.show(this.container, search); this.$.dropDown.show(this.container, search);
} }

View File

@ -6,6 +6,16 @@ export default class Range extends FormInput {
constructor($element, $scope) { constructor($element, $scope) {
super($element, $scope); super($element, $scope);
this.input = this.element.querySelector('input'); this.input = this.element.querySelector('input');
this.input.addEventListener('change', () => this.onValueUpdate());
}
get field() {
return super.field;
}
set field(value) {
this.input.value = value;
super.field = value;
} }
get max() { get max() {
@ -35,6 +45,11 @@ export default class Range extends FormInput {
refreshTabIndex() { refreshTabIndex() {
this.input.tabIndex = this.disabled ? -1 : this.tabIndex; this.input.tabIndex = this.disabled ? -1 : this.tabIndex;
} }
onValueUpdate() {
this.change(this.input.value);
this.$.$applyAsync();
}
} }
ngModule.vnComponent('vnRange', { ngModule.vnComponent('vnRange', {

View File

@ -11,7 +11,7 @@
</vn-auto-search> </vn-auto-search>
<vn-data-viewer <vn-data-viewer
model="model" model="model"
class="vn-w-md"> class="vn-w-lg">
<vn-card> <vn-card>
<vn-table model="model"> <vn-table model="model">
<vn-thead> <vn-thead>

View File

@ -87,7 +87,7 @@
<section class="photo" ng-repeat="photo in photos"> <section class="photo" ng-repeat="photo in photos">
<section class="image" on-error-src <section class="image" on-error-src
ng-style="{'background': 'url(/api/dms/' + photo.dmsFk + '/downloadFile?access_token=' + $ctrl.accessToken + ')'}" ng-style="{'background': 'url(/api/dms/' + photo.dmsFk + '/downloadFile?access_token=' + $ctrl.accessToken + ')'}"
zoom-image="dms/{{::photo.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}"> zoom-image="/api/dms/{{::photo.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}">
</section> </section>
</section> </section>
</vn-horizontal> </vn-horizontal>

View File

@ -6,7 +6,7 @@
auto-load="false"> auto-load="false">
</vn-crud-model> </vn-crud-model>
<vn-vertical> <vn-vertical>
<vn-card class="vn-pa-lg vn-w-md"> <vn-card class="vn-pa-lg vn-w-lg">
<vn-vertical> <vn-vertical>
<vn-horizontal> <vn-horizontal>
<vn-autocomplete <vn-autocomplete

View File

@ -11,28 +11,25 @@ class Controller {
this.$http = $http; this.$http = $http;
this.edit = {}; this.edit = {};
this.moreOptions = [ this.moreOptions = [
{name: 'Send SMS', callback: this.showSMSDialog},
{ {
name: 'Send SMS',
callback: this.showSMSDialog
}, {
name: 'Mark as reserved', name: 'Mark as reserved',
callback: this.markAsReserved, callback: this.markAsReserved,
show: () => this.isEditable show: () => this.isEditable
}, }, {
{
name: 'Unmark as reserved', name: 'Unmark as reserved',
callback: this.unmarkAsReserved, callback: this.unmarkAsReserved,
show: () => this.isEditable show: () => this.isEditable
}, }, {
{
name: 'Update discount', name: 'Update discount',
callback: this.showEditDialog, callback: this.showEditDialog,
show: () => this.isEditable show: () => this.isEditable
}, }, {
{
name: 'Add claim', name: 'Add claim',
callback: this.createClaim, callback: this.createClaim
show: () => this.isEditable }, {
},
{
name: 'Recalculate price', name: 'Recalculate price',
callback: this.calculateSalePrice, callback: this.calculateSalePrice,
show: () => this.hasOneSaleSelected() show: () => this.hasOneSaleSelected()

View File

@ -24,8 +24,7 @@
"url": "/index?q", "url": "/index?q",
"state": "travel.index", "state": "travel.index",
"component": "vn-travel-index", "component": "vn-travel-index",
"description": "Travels", "description": "Travels"
"acl": ["developer"]
}, { }, {
"url": "/:id", "url": "/:id",
"state": "travel.card", "state": "travel.card",

View File

@ -16,9 +16,6 @@
{{::item.name}} {{::item.name}}
</vn-treeview> </vn-treeview>
</vn-card> </vn-card>
<vn-button-bar>
<vn-button ui-sref="worker.index" label="Back"></vn-button>
</vn-button-bar>
</form> </form>
<vn-confirm <vn-confirm
vn-id="deleteNode" vn-id="deleteNode"

View File

@ -51,7 +51,7 @@
"params": { "params": {
"worker": "$ctrl.worker" "worker": "$ctrl.worker"
}, },
"acl": ["developer"] "acl": ["hr"]
}, { }, {
"url": "/pbx", "url": "/pbx",
"state": "worker.card.pbx", "state": "worker.card.pbx",
@ -81,7 +81,8 @@
"url" : "/department", "url" : "/department",
"state": "worker.department", "state": "worker.department",
"component": "vn-worker-department", "component": "vn-worker-department",
"description": "Departments" "description": "Departments",
"acl": ["hr"]
}, { }, {
"url": "/phones", "url": "/phones",
"state": "worker.card.phones", "state": "worker.card.phones",
@ -89,7 +90,8 @@
"description": "Phones", "description": "Phones",
"params": { "params": {
"worker": "$ctrl.worker" "worker": "$ctrl.worker"
} },
"acl": ["hr"]
}, },
{ {
"url": "/dms", "url": "/dms",
@ -101,7 +103,8 @@
"url": "/index", "url": "/index",
"state": "worker.card.dms.index", "state": "worker.card.dms.index",
"component": "vn-worker-dms-index", "component": "vn-worker-dms-index",
"description": "File management" "description": "File management",
"acl": ["hr"]
}, },
{ {
"url": "/create", "url": "/create",
@ -110,7 +113,8 @@
"description": "Upload file", "description": "Upload file",
"params": { "params": {
"worker": "$ctrl.worker" "worker": "$ctrl.worker"
} },
"acl": ["hr"]
}, },
{ {
"url": "/:dmsId/edit", "url": "/:dmsId/edit",
@ -119,7 +123,8 @@
"description": "Edit file", "description": "Edit file",
"params": { "params": {
"worker": "$ctrl.worker" "worker": "$ctrl.worker"
} },
"acl": ["hr"]
} }
] ]
} }