4002-item.itemType #974
|
@ -0,0 +1,3 @@
|
||||||
|
INSERT INTO salix.ACL
|
||||||
vicent marked this conversation as resolved
Outdated
|
|||||||
|
(model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES('ItemType', '*', '*', 'ALLOW', 'ROLE', 'employee');
|
|
@ -773,14 +773,19 @@ INSERT INTO `vn`.`itemCategory`(`id`, `name`, `display`, `color`, `icon`, `code`
|
||||||
(7, 'Accessories', 1, NULL, 'icon-accessory', 'accessory'),
|
(7, 'Accessories', 1, NULL, 'icon-accessory', 'accessory'),
|
||||||
(8, 'Fruit', 1, NULL, 'icon-fruit', 'fruit');
|
(8, 'Fruit', 1, NULL, 'icon-fruit', 'fruit');
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemType`(`id`, `code`, `name`, `categoryFk`, `warehouseFk`, `life`,`workerFk`, `isPackaging`)
|
INSERT INTO `vn`.`temperature`(`code`, `name`, `description`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'CRI', 'Crisantemo', 2, 1, 31, 35, 0),
|
('warm', 'Warm', 'Warm'),
|
||||||
(2, 'ITG', 'Anthurium', 1, 1, 31, 35, 0),
|
('cool', 'Cool', 'Cool');
|
||||||
(3, 'WPN', 'Paniculata', 2, 1, 31, 35, 0),
|
|
||||||
(4, 'PRT', 'Delivery ports', 3, 1, NULL, 35, 1),
|
INSERT INTO `vn`.`itemType`(`id`, `code`, `name`, `categoryFk`, `warehouseFk`, `life`,`workerFk`, `isPackaging`, `temperatureFk`)
|
||||||
(5, 'CON', 'Container', 3, 1, NULL, 35, 1),
|
VALUES
|
||||||
(6, 'ALS', 'Alstroemeria', 1, 1, 31, 16, 0);
|
(1, 'CRI', 'Crisantemo', 2, 1, 31, 35, 0, 'cool'),
|
||||||
|
(2, 'ITG', 'Anthurium', 1, 1, 31, 35, 0, 'cool'),
|
||||||
|
(3, 'WPN', 'Paniculata', 2, 1, 31, 35, 0, 'cool'),
|
||||||
|
(4, 'PRT', 'Delivery ports', 3, 1, NULL, 35, 1, 'warm'),
|
||||||
|
(5, 'CON', 'Container', 3, 1, NULL, 35, 1, 'warm'),
|
||||||
|
(6, 'ALS', 'Alstroemeria', 1, 1, 31, 16, 0, 'warm');
|
||||||
|
|
||||||
INSERT INTO `vn`.`ink`(`id`, `name`, `picture`, `showOrder`, `hex`)
|
INSERT INTO `vn`.`ink`(`id`, `name`, `picture`, `showOrder`, `hex`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -2309,11 +2314,6 @@ INSERT INTO `vn`.`workerTimeControlParams` (`id`, `dayBreak`, `weekBreak`, `week
|
||||||
(1, 43200, 129600, 734400, 43200, 50400, 259200, 1296000, 36000);
|
(1, 43200, 129600, 734400, 43200, 50400, 259200, 1296000, 36000);
|
||||||
|
|
||||||
INSERT IGNORE INTO `vn`.`greugeConfig` (`id`, `freightPickUpPrice`) VALUES ('1', '11');
|
INSERT IGNORE INTO `vn`.`greugeConfig` (`id`, `freightPickUpPrice`) VALUES ('1', '11');
|
||||||
|
|
||||||
INSERT INTO `vn`.`temperature`(`code`, `name`, `description`)
|
|
||||||
VALUES
|
|
||||||
('warm', 'Warm', 'Warm'),
|
|
||||||
('cool', 'Cool', 'Cool');
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`thermograph`(`id`, `model`)
|
INSERT INTO `vn`.`thermograph`(`id`, `model`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
|
@ -6,8 +6,6 @@ class Controller extends Component {
|
||||||
this._role = value;
|
this._role = value;
|
||||||
this.$.summary = null;
|
this.$.summary = null;
|
||||||
if (!value) return;
|
if (!value) return;
|
||||||
console.log(value);
|
|
||||||
|
|
||||||
this.$http.get(`Roles/${value.id}`)
|
this.$http.get(`Roles/${value.id}`)
|
||||||
.then(res => this.$.summary = res.data);
|
.then(res => this.$.summary = res.data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,10 @@
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"categoryFk": {
|
"categoryFk": {
|
||||||
vicent marked this conversation as resolved
Outdated
carlosjr
commented
it's important to add the relations to any foreign key instead of a siemple field (just the foreign key) it's important to add the relations to any foreign key instead of a siemple field (just the foreign key)
|
|||||||
"type": "boolean"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"temperatureFk": {
|
"temperatureFk": {
|
||||||
"type": "boolean"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
vicent marked this conversation as resolved
Outdated
carlosjr
commented
relation still missing relation still missing
|
|||||||
"relations": {
|
"relations": {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<vn-watcher
|
<vn-watcher
|
||||||
vn-id="watcher"
|
vn-id="watcher"
|
||||||
url="ItemTypes"
|
url="ItemTypes"
|
||||||
data="$ctrl.role"
|
data="$ctrl.itemType"
|
||||||
form="form">
|
form="form">
|
||||||
</vn-watcher>
|
</vn-watcher>
|
||||||
<form
|
<form
|
||||||
|
@ -11,16 +11,40 @@
|
||||||
<vn-card class="vn-pa-lg">
|
<vn-card class="vn-pa-lg">
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
label="Name"
|
label="Code"
|
||||||
ng-model="$ctrl.role.name"
|
ng-model="$ctrl.itemType.code"
|
||||||
rule
|
rule
|
||||||
vn-focus>
|
vn-focus>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
label="Description"
|
label="Name"
|
||||||
ng-model="$ctrl.role.description"
|
ng-model="$ctrl.itemType.name"
|
||||||
rule>
|
rule>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
|
<vn-autocomplete
|
||||||
|
label="Worker"
|
||||||
|
ng-model="$ctrl.itemType.workerFk"
|
||||||
|
url="Workers"
|
||||||
|
show-field="firstName"
|
||||||
|
value-field="id"
|
||||||
|
rule>
|
||||||
|
</vn-autocomplete>
|
||||||
|
<vn-autocomplete
|
||||||
|
label="Category"
|
||||||
|
ng-model="$ctrl.itemType.categoryFk"
|
||||||
|
url="ItemCategories"
|
||||||
|
show-field="name"
|
||||||
|
value-field="id"
|
||||||
|
rule>
|
||||||
|
</vn-autocomplete>
|
||||||
|
<vn-autocomplete
|
||||||
|
label="Temperature"
|
||||||
|
ng-model="$ctrl.itemType.temperatureFk"
|
||||||
|
url="Temperatures"
|
||||||
|
show-field="name"
|
||||||
|
value-field="code"
|
||||||
|
rule>
|
||||||
|
</vn-autocomplete>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
|
|
|
@ -7,6 +7,6 @@ ngModule.component('vnItemTypeBasicData', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
role: '<'
|
itemType: '<'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<vn-portal slot="menu">
|
<vn-portal slot="menu">
|
||||||
<vn-item-type-descriptor itemType="$ctrl.itemType"></vn-item-type-descriptor>
|
<vn-item-type-descriptor item-type="$ctrl.itemType"></vn-item-type-descriptor>
|
||||||
<vn-left-menu source="itemType"></vn-left-menu>
|
<vn-left-menu source="itemType"></vn-left-menu>
|
||||||
</vn-portal>
|
</vn-portal>
|
||||||
<ui-view></ui-view>
|
<ui-view></ui-view>
|
||||||
|
|
|
@ -4,10 +4,7 @@ import ModuleCard from 'salix/components/module-card';
|
||||||
class Controller extends ModuleCard {
|
class Controller extends ModuleCard {
|
||||||
reload() {
|
reload() {
|
||||||
this.$http.get(`ItemTypes/${this.$params.id}`)
|
this.$http.get(`ItemTypes/${this.$params.id}`)
|
||||||
.then(res => {
|
.then(res => this.itemType = res.data);
|
||||||
this.itemType = res.data;
|
|
||||||
console.log(this.itemType);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
import './index';
|
import './index';
|
||||||
|
|
||||||
describe('component vnRoleCard', () => {
|
describe('component vnItemTypeCard', () => {
|
||||||
let controller;
|
let controller;
|
||||||
let $httpBackend;
|
let $httpBackend;
|
||||||
|
|
||||||
beforeEach(ngModule('account'));
|
beforeEach(ngModule('item'));
|
||||||
|
|
||||||
beforeEach(inject(($componentController, _$httpBackend_) => {
|
beforeEach(inject(($componentController, _$httpBackend_) => {
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
controller = $componentController('vnRoleCard', {$element: null});
|
controller = $componentController('vnItemTypeCard', {$element: null});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('reload()', () => {
|
describe('reload()', () => {
|
||||||
it('should reload the controller data', () => {
|
it('should reload the controller data', () => {
|
||||||
controller.$params.id = 1;
|
controller.$params.id = 1;
|
||||||
|
|
||||||
$httpBackend.expectGET('Roles/1').respond('foo');
|
$httpBackend.expectGET('ItemTypes/1').respond('foo');
|
||||||
vicent marked this conversation as resolved
Outdated
carlosjr
commented
"foo" doesn't give context, therefore not making code maintenance easier. "foo" doesn't give context, therefore not making code maintenance easier.
|
|||||||
controller.reload();
|
controller.reload();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
expect(controller.role).toBe('foo');
|
expect(controller.itemType).toBe('foo');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<vn-watcher
|
<vn-watcher
|
||||||
vn-id="watcher"
|
vn-id="watcher"
|
||||||
url="Roles"
|
url="ItemTypes"
|
||||||
data="$ctrl.role"
|
data="$ctrl.itemType"
|
||||||
insert-mode="true"
|
insert-mode="true"
|
||||||
form="form">
|
form="form">
|
||||||
</vn-watcher>
|
</vn-watcher>
|
||||||
|
@ -12,16 +12,40 @@
|
||||||
<vn-card class="vn-pa-lg">
|
<vn-card class="vn-pa-lg">
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
label="Name"
|
label="Code"
|
||||||
ng-model="$ctrl.role.name"
|
ng-model="$ctrl.itemType.code"
|
||||||
rule
|
rule
|
||||||
vn-focus>
|
vn-focus>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
label="Description"
|
label="Name"
|
||||||
ng-model="$ctrl.role.description"
|
ng-model="$ctrl.itemType.name"
|
||||||
rule>
|
rule>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
|
<vn-autocomplete
|
||||||
|
label="Worker"
|
||||||
|
ng-model="$ctrl.itemType.workerFk"
|
||||||
|
url="Workers"
|
||||||
|
show-field="firstName"
|
||||||
|
value-field="id"
|
||||||
|
rule>
|
||||||
|
</vn-autocomplete>
|
||||||
|
<vn-autocomplete
|
||||||
|
label="Category"
|
||||||
|
ng-model="$ctrl.itemType.categoryFk"
|
||||||
|
url="ItemCategories"
|
||||||
|
show-field="name"
|
||||||
|
value-field="id"
|
||||||
|
rule>
|
||||||
|
</vn-autocomplete>
|
||||||
|
<vn-autocomplete
|
||||||
|
label="Temperature"
|
||||||
|
ng-model="$ctrl.itemType.temperatureFk"
|
||||||
|
url="Temperatures"
|
||||||
|
show-field="name"
|
||||||
|
value-field="code"
|
||||||
|
rule>
|
||||||
|
</vn-autocomplete>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
|
@ -32,7 +56,7 @@
|
||||||
<vn-button
|
<vn-button
|
||||||
class="cancel"
|
class="cancel"
|
||||||
label="Cancel"
|
label="Cancel"
|
||||||
ui-sref="account.role">
|
ui-sref="item.itemType">
|
||||||
</vn-button>
|
</vn-button>
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Section from 'salix/components/section';
|
||||||
export default class Controller extends Section {
|
export default class Controller extends Section {
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
return this.$.watcher.submit().then(res =>
|
return this.$.watcher.submit().then(res =>
|
||||||
this.$state.go('account.role.card.basicData', {id: res.data.id})
|
this.$state.go('item.itemType.card.basicData', {id: res.data.id})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="item"
|
module="item"
|
||||||
base-state="item.itemType"
|
base-state="item.itemType"
|
||||||
description="$ctrl.itemType.name">
|
description="$ctrl.itemType.code">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="deleteItemType.show()"
|
ng-click="deleteItemType.show()"
|
||||||
|
@ -12,6 +12,10 @@
|
||||||
</slot-menu>
|
</slot-menu>
|
||||||
<slot-body>
|
<slot-body>
|
||||||
<div class="attributes">
|
<div class="attributes">
|
||||||
|
<vn-label-value
|
||||||
|
label="Code"
|
||||||
|
value="{{$ctrl.itemType.code}}">
|
||||||
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Name"
|
label="Name"
|
||||||
value="{{$ctrl.itemType.name}}">
|
value="{{$ctrl.itemType.name}}">
|
||||||
|
|
|
@ -2,10 +2,6 @@ import ngModule from '../../module';
|
||||||
import Descriptor from 'salix/components/descriptor';
|
import Descriptor from 'salix/components/descriptor';
|
||||||
|
|
||||||
class Controller extends Descriptor {
|
class Controller extends Descriptor {
|
||||||
$onInit() {
|
|
||||||
console.log(this.itemType, this.entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
get itemType() {
|
get itemType() {
|
||||||
return this.entity;
|
return this.entity;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import './index';
|
import './index';
|
||||||
|
|
||||||
describe('component vnRoleDescriptor', () => {
|
describe('component vnItemTypeDescriptor', () => {
|
||||||
let controller;
|
let controller;
|
||||||
let $httpBackend;
|
let $httpBackend;
|
||||||
|
|
||||||
let role = {id: 1, name: 'foo'};
|
let itemType = {id: 1, name: 'foo'};
|
||||||
|
|
||||||
beforeEach(ngModule('account'));
|
beforeEach(ngModule('item'));
|
||||||
|
|
||||||
beforeEach(inject(($componentController, _$httpBackend_) => {
|
beforeEach(inject(($componentController, _$httpBackend_) => {
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
controller = $componentController('vnRoleDescriptor', {$element: null}, {role});
|
controller = $componentController('vnItemTypeDescriptor', {$element: null}, {itemType});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('onDelete()', () => {
|
describe('onDelete()', () => {
|
||||||
|
@ -18,11 +18,11 @@ describe('component vnRoleDescriptor', () => {
|
||||||
controller.$state.go = jest.fn();
|
controller.$state.go = jest.fn();
|
||||||
jest.spyOn(controller.vnApp, 'showSuccess');
|
jest.spyOn(controller.vnApp, 'showSuccess');
|
||||||
|
|
||||||
$httpBackend.expectDELETE('Roles/1').respond();
|
$httpBackend.expectDELETE('ItemTypes/1').respond();
|
||||||
controller.onDelete();
|
controller.onDelete();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
expect(controller.$state.go).toHaveBeenCalledWith('account.role');
|
expect(controller.$state.go).toHaveBeenCalledWith('item.itemType');
|
||||||
expect(controller.vnApp.showSuccess).toHaveBeenCalled();
|
expect(controller.vnApp.showSuccess).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,6 +3,5 @@ import './index/';
|
||||||
import './summary';
|
import './summary';
|
||||||
import './card';
|
import './card';
|
||||||
import './descriptor';
|
import './descriptor';
|
||||||
import './search-panel';
|
|
||||||
import './create';
|
import './create';
|
||||||
import './basic-data';
|
import './basic-data';
|
||||||
|
|
|
@ -33,14 +33,11 @@
|
||||||
</vn-card>
|
</vn-card>
|
||||||
</vn-data-viewer>
|
</vn-data-viewer>
|
||||||
<vn-popup vn-id="summary">
|
<vn-popup vn-id="summary">
|
||||||
<vn-item-type-summary itemType="$ctrl.selectedItemType"></vn-item-type-summary>
|
<vn-item-type-summary item-type="$ctrl.selectedItemType"></vn-item-type-summary>
|
||||||
</vn-popup>
|
</vn-popup>
|
||||||
<a ui-sref="account.role.create"
|
<a ui-sref="item.itemType.create"
|
||||||
ui-sref-opts="{inherit: false}"
|
vn-tooltip="New itemType"
|
||||||
vn-tooltip="New role"
|
|
||||||
vn-bind="+"
|
vn-bind="+"
|
||||||
vn-acl="it"
|
|
||||||
vn-acl-action="remove"
|
|
||||||
fixed-bottom-right>
|
fixed-bottom-right>
|
||||||
<vn-float-button icon="add"></vn-float-button>
|
<vn-float-button icon="add"></vn-float-button>
|
||||||
</a>
|
</a>
|
|
@ -4,7 +4,6 @@ import Section from 'salix/components/section';
|
||||||
export default class Controller extends Section {
|
export default class Controller extends Section {
|
||||||
preview(itemType) {
|
preview(itemType) {
|
||||||
this.selectedItemType = itemType;
|
this.selectedItemType = itemType;
|
||||||
console.log(this.selectedItemType);
|
|
||||||
this.$.summary.show();
|
this.$.summary.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
Item Type: Familia
|
Item Type: Familia
|
||||||
|
New itemType: Nueva familia
|
|
@ -1,21 +0,0 @@
|
||||||
<div class="search-panel">
|
|
||||||
<form ng-submit="$ctrl.onSearch()">
|
|
||||||
<vn-horizontal>
|
|
||||||
<vn-textfield
|
|
||||||
vn-one
|
|
||||||
label="Code"
|
|
||||||
ng-model="filter.code">
|
|
||||||
</vn-textfield>
|
|
||||||
</vn-horizontal>
|
|
||||||
<vn-horizontal>
|
|
||||||
<vn-textfield
|
|
||||||
vn-one
|
|
||||||
label="Name"
|
|
||||||
ng-model="filter.name">
|
|
||||||
</vn-textfield>
|
|
||||||
</vn-horizontal>
|
|
||||||
<vn-horizontal class="vn-mt-lg">
|
|
||||||
<vn-submit label="Search"></vn-submit>
|
|
||||||
</vn-horizontal>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
|
@ -1,7 +0,0 @@
|
||||||
import ngModule from '../../module';
|
|
||||||
import SearchPanel from 'core/components/searchbar/search-panel';
|
|
||||||
|
|
||||||
ngModule.component('vnItemTypePanel', {
|
|
||||||
template: require('./index.html'),
|
|
||||||
controller: SearchPanel
|
|
||||||
});
|
|
|
@ -1,5 +1,7 @@
|
||||||
<vn-card class="summary">
|
<vn-card class="summary">
|
||||||
<h5>{{summary.name}}</h5>
|
<h5>
|
||||||
|
<span>{{summary.id}} - {{summary.name}} - {{summary.worker.firstName}} {{summary.worker.lastName}}</span>
|
||||||
|
</h5>
|
||||||
<vn-horizontal class="vn-pa-md">
|
<vn-horizontal class="vn-pa-md">
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<h4 translate>Basic data</h4>
|
<h4 translate>Basic data</h4>
|
||||||
|
@ -7,13 +9,25 @@
|
||||||
label="Id"
|
label="Id"
|
||||||
value="{{summary.id}}">
|
value="{{summary.id}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
|
<vn-label-value
|
||||||
|
label="Code"
|
||||||
|
value="{{summary.code}}">
|
||||||
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Name"
|
label="Name"
|
||||||
value="{{summary.name}}">
|
value="{{summary.name}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Description"
|
label="Worker"
|
||||||
value="{{summary.description}}">
|
value="{{summary.worker.firstName}} {{summary.worker.lastName}}">
|
||||||
|
</vn-label-value>
|
||||||
|
<vn-label-value
|
||||||
|
label="Category"
|
||||||
|
value="{{summary.category.name}}">
|
||||||
|
</vn-label-value>
|
||||||
|
<vn-label-value
|
||||||
|
label="Temperature"
|
||||||
|
value="{{summary.temperatureFk}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
|
@ -6,10 +6,15 @@ class Controller extends Component {
|
||||||
this._itemType = value;
|
this._itemType = value;
|
||||||
this.$.summary = null;
|
this.$.summary = null;
|
||||||
if (!value) return;
|
if (!value) return;
|
||||||
console.log(value);
|
|
||||||
|
|
||||||
this.$http.get(`ItemTypes/${value.id}`)
|
const filter = {
|
||||||
.then(res => console.log(res.data));
|
include: [
|
||||||
|
{relation: 'worker'},
|
||||||
|
{relation: 'category'}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
this.$http.get(`ItemTypes/${value.id}`, {filter})
|
||||||
|
.then(res => this.$.summary = res.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
get itemType() {
|
get itemType() {
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
{"state": "item.card.diary", "icon": "icon-transaction"},
|
{"state": "item.card.diary", "icon": "icon-transaction"},
|
||||||
{"state": "item.card.last-entries", "icon": "icon-regentry"},
|
{"state": "item.card.last-entries", "icon": "icon-regentry"},
|
||||||
{"state": "item.card.log", "icon": "history"}
|
{"state": "item.card.log", "icon": "history"}
|
||||||
|
],
|
||||||
|
"itemType": [
|
||||||
|
{"state": "item.itemType.card.basicData", "icon": "settings"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"keybindings": [
|
"keybindings": [
|
||||||
|
@ -198,7 +201,7 @@
|
||||||
"component": "vn-item-type-summary",
|
"component": "vn-item-type-summary",
|
||||||
"description": "Summary",
|
"description": "Summary",
|
||||||
"params": {
|
"params": {
|
||||||
"itemType": "$ctrl.itemType"
|
"item-type": "$ctrl.itemType"
|
||||||
},
|
},
|
||||||
"acl": ["buyer"]
|
"acl": ["buyer"]
|
||||||
},
|
},
|
||||||
|
@ -208,7 +211,7 @@
|
||||||
"component": "vn-item-type-basic-data",
|
"component": "vn-item-type-basic-data",
|
||||||
"description": "Basic data",
|
"description": "Basic data",
|
||||||
"params": {
|
"params": {
|
||||||
"itemType": "$ctrl.itemType"
|
"item-type": "$ctrl.itemType"
|
||||||
},
|
},
|
||||||
"acl": ["buyer"]
|
"acl": ["buyer"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
you are inserting in the same table using the INSERT INTO twice...
you can wrap both in the same insert ie:
INSERT INTO
salix
.ACL
(model
,property
,accessType
,permission
,principalType
,principalId
)VALUES
('ItemType', '', 'READ', 'ALLOW', 'ROLE', 'employee'),
('ItemType', '', 'WRITE', 'ALLOW', 'ROLE', 'buyer');