Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2937-module_transactions
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
647b7a93cd
|
@ -0,0 +1,18 @@
|
||||||
|
CREATE TABLE `vn`.`invoiceInLog` (
|
||||||
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`originFk` MEDIUMINT UNSIGNED NOT NULL,
|
||||||
|
`userFk` int(10) unsigned DEFAULT NULL,
|
||||||
|
`action` set('insert','update','delete') COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`creationDate` timestamp NULL DEFAULT current_timestamp(),
|
||||||
|
`description` text CHARACTER SET utf8 DEFAULT NULL,
|
||||||
|
`changedModel` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`oldInstance` text COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`newInstance` text COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`changedModelId` int(11) DEFAULT NULL,
|
||||||
|
`changedModelValue` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `originFk` (`originFk`),
|
||||||
|
KEY `userFk` (`userFk`),
|
||||||
|
CONSTRAINT `invoiceInLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `vn`.`invoiceIn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||||
|
CONSTRAINT `invoiceInLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
@ -1 +0,0 @@
|
||||||
Delete me!!
|
|
|
@ -26,30 +26,35 @@
|
||||||
"abstract": true,
|
"abstract": true,
|
||||||
"component": "vn-entry",
|
"component": "vn-entry",
|
||||||
"description": "Entries"
|
"description": "Entries"
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"url": "/index?q",
|
"url": "/index?q",
|
||||||
"state": "entry.index",
|
"state": "entry.index",
|
||||||
"component": "vn-entry-index",
|
"component": "vn-entry-index",
|
||||||
"description": "Entries",
|
"description": "Entries",
|
||||||
"acl": ["buyer", "administrative"]
|
"acl": ["buyer", "administrative"]
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"url": "/latest-buys?q",
|
"url": "/latest-buys?q",
|
||||||
"state": "entry.latestBuys",
|
"state": "entry.latestBuys",
|
||||||
"component": "vn-entry-latest-buys",
|
"component": "vn-entry-latest-buys",
|
||||||
"description": "Latest buys",
|
"description": "Latest buys",
|
||||||
"acl": ["buyer", "administrative"]
|
"acl": ["buyer", "administrative"]
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"url": "/create?supplierFk&travelFk&companyFk",
|
"url": "/create?supplierFk&travelFk&companyFk",
|
||||||
"state": "entry.create",
|
"state": "entry.create",
|
||||||
"component": "vn-entry-create",
|
"component": "vn-entry-create",
|
||||||
"description": "New entry",
|
"description": "New entry",
|
||||||
"acl": ["buyer", "administrative"]
|
"acl": ["buyer", "administrative"]
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"url": "/:id",
|
"url": "/:id",
|
||||||
"state": "entry.card",
|
"state": "entry.card",
|
||||||
"abstract": true,
|
"abstract": true,
|
||||||
"component": "vn-entry-card"
|
"component": "vn-entry-card"
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"url": "/summary",
|
"url": "/summary",
|
||||||
"state": "entry.card.summary",
|
"state": "entry.card.summary",
|
||||||
"component": "vn-entry-summary",
|
"component": "vn-entry-summary",
|
||||||
|
@ -58,7 +63,8 @@
|
||||||
"entry": "$ctrl.entry"
|
"entry": "$ctrl.entry"
|
||||||
},
|
},
|
||||||
"acl": ["buyer", "administrative"]
|
"acl": ["buyer", "administrative"]
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"url": "/basic-data",
|
"url": "/basic-data",
|
||||||
"state": "entry.card.basicData",
|
"state": "entry.card.basicData",
|
||||||
"component": "vn-entry-basic-data",
|
"component": "vn-entry-basic-data",
|
||||||
|
@ -67,7 +73,8 @@
|
||||||
"entry": "$ctrl.entry"
|
"entry": "$ctrl.entry"
|
||||||
},
|
},
|
||||||
"acl": ["buyer", "administrative"]
|
"acl": ["buyer", "administrative"]
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
"url": "/observation",
|
"url": "/observation",
|
||||||
"state": "entry.card.observation",
|
"state": "entry.card.observation",
|
||||||
"component": "vn-entry-observation",
|
"component": "vn-entry-observation",
|
||||||
|
@ -76,7 +83,8 @@
|
||||||
"entry": "$ctrl.entry"
|
"entry": "$ctrl.entry"
|
||||||
},
|
},
|
||||||
"acl": ["buyer", "administrative"]
|
"acl": ["buyer", "administrative"]
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
"url" : "/log",
|
"url" : "/log",
|
||||||
"state": "entry.card.log",
|
"state": "entry.card.log",
|
||||||
"component": "vn-entry-log",
|
"component": "vn-entry-log",
|
||||||
|
|
|
@ -4,5 +4,8 @@
|
||||||
},
|
},
|
||||||
"InvoiceInDueDay": {
|
"InvoiceInDueDay": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"InvoiceInLog": {
|
||||||
|
"dataSource": "vn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"name": "InvoiceInLog",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "invoiceInLog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"id": true,
|
||||||
|
"type": "number",
|
||||||
|
"forceId": false
|
||||||
|
},
|
||||||
|
"originFk": {
|
||||||
|
"type": "number",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"userFk": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "string",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"changedModel": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"oldInstance": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"newInstance": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"creationDate": {
|
||||||
|
"type": "date"
|
||||||
|
},
|
||||||
|
"changedModelId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"changedModelValue": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"relations": {
|
||||||
|
"user": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "Account",
|
||||||
|
"foreignKey": "userFk"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scope": {
|
||||||
|
"order": [
|
||||||
|
"creationDate DESC",
|
||||||
|
"id DESC"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "InvoiceIn",
|
"name": "InvoiceIn",
|
||||||
"base": "VnModel",
|
"base": "Loggable",
|
||||||
|
"log": {
|
||||||
|
"model": "InvoiceInLog"
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"mysql": {
|
"mysql": {
|
||||||
"table": "invoiceIn"
|
"table": "invoiceIn"
|
||||||
|
|
|
@ -8,3 +8,4 @@ import './descriptor';
|
||||||
import './descriptor-popover';
|
import './descriptor-popover';
|
||||||
import './summary';
|
import './summary';
|
||||||
import './basic-data';
|
import './basic-data';
|
||||||
|
import './log';
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<vn-log url="InvoiceInLogs" origin-id="$ctrl.$params.id"></vn-log>
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ngModule from '../module';
|
||||||
|
import Section from 'salix/components/section';
|
||||||
|
|
||||||
|
ngModule.vnComponent('vnInvoiceInLog', {
|
||||||
|
template: require('./index.html'),
|
||||||
|
controller: Section,
|
||||||
|
});
|
|
@ -12,6 +12,10 @@
|
||||||
{
|
{
|
||||||
"state": "invoiceIn.card.basicData",
|
"state": "invoiceIn.card.basicData",
|
||||||
"icon": "settings"
|
"icon": "settings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"state": "invoiceIn.card.log",
|
||||||
|
"icon": "history"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -53,7 +57,15 @@
|
||||||
"description": "Basic data",
|
"description": "Basic data",
|
||||||
"params": {
|
"params": {
|
||||||
"invoice-in": "$ctrl.invoiceIn"
|
"invoice-in": "$ctrl.invoiceIn"
|
||||||
}
|
},
|
||||||
|
"acl": ["administrative"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "/log",
|
||||||
|
"state": "invoiceIn.card.log",
|
||||||
|
"component": "vn-invoice-in-log",
|
||||||
|
"description": "Log",
|
||||||
|
"acl": ["administrative"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -34,7 +34,7 @@
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-th class="icon-field"></vn-th>
|
<vn-th class="icon-field"></vn-th>
|
||||||
<vn-th field="nickname" expand>Client</vn-th>
|
<vn-th field="nickname">Client</vn-th>
|
||||||
<vn-th field="salesPersonFk" class="expendable" shrink>Salesperson</vn-th>
|
<vn-th field="salesPersonFk" class="expendable" shrink>Salesperson</vn-th>
|
||||||
<vn-th field="shipped" shrink-date>Date</vn-th>
|
<vn-th field="shipped" shrink-date>Date</vn-th>
|
||||||
<vn-th>Hour</vn-th>
|
<vn-th>Hour</vn-th>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
icon="icon-components">
|
icon="icon-components">
|
||||||
</vn-icon>
|
</vn-icon>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td expand>
|
<vn-td>
|
||||||
<span
|
<span
|
||||||
title="{{::ticket.nickname}}"
|
title="{{::ticket.nickname}}"
|
||||||
vn-click-stop="clientDescriptor.show($event, ticket.clientFk)"
|
vn-click-stop="clientDescriptor.show($event, ticket.clientFk)"
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td shrink-date>
|
<vn-td shrink-date>
|
||||||
<span class="chip {{$ctrl.compareDate(ticket.shipped)}}">
|
<span class="chip {{::$ctrl.compareDate(ticket.shipped)}}">
|
||||||
{{::ticket.shipped | date: 'dd/MM/yyyy'}}
|
{{::ticket.shipped | date: 'dd/MM/yyyy'}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
|
@ -122,8 +122,8 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
ng-show="::!ticket.refFk"
|
ng-show="::!ticket.refFk"
|
||||||
class="chip {{$ctrl.stateColor(ticket)}}">
|
class="chip {{::$ctrl.stateColor(ticket)}}">
|
||||||
{{ticket.state}}
|
{{::ticket.state}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td>
|
<vn-td>
|
||||||
|
|
|
@ -12,6 +12,10 @@ vn-monitor-sales-tickets {
|
||||||
padding: 0
|
padding: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vn-th[field="nickname"] {
|
||||||
|
width: 250px
|
||||||
|
}
|
||||||
|
|
||||||
vn-td.icon-field > vn-icon {
|
vn-td.icon-field > vn-icon {
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
|
|
Loading…
Reference in New Issue