Merge branch 'dev' of http://git.verdnatura.es/salix into dev
This commit is contained in:
commit
83381b4c70
|
@ -0,0 +1 @@
|
|||
export * from './src';
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"module": "claim",
|
||||
"name": "Claims",
|
||||
"icon": "icon-claims",
|
||||
"validations": true,
|
||||
"routes": [
|
||||
{
|
||||
"url": "/claim",
|
||||
"state": "claim",
|
||||
"abstract": true,
|
||||
"component": "ui-view",
|
||||
"description": "Claims"
|
||||
},
|
||||
{
|
||||
"url": "/index?q",
|
||||
"state": "claim.index",
|
||||
"component": "vn-claim-index",
|
||||
"description": "Listado"
|
||||
},
|
||||
{
|
||||
"url": "/:id",
|
||||
"state": "claim.card",
|
||||
"abstract": true,
|
||||
"component": "vn-claim-card"
|
||||
},
|
||||
{
|
||||
"url": "/summary",
|
||||
"state": "claim.card.summary",
|
||||
"component": "vn-claim-summary",
|
||||
"description": "Summary",
|
||||
"params": {
|
||||
"claim": "$ctrl.claim"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
export * from './module';
|
||||
|
||||
import './index/';
|
||||
/*
|
||||
import './card';
|
||||
import './descriptor';
|
||||
import './summary'; */
|
|
@ -0,0 +1,80 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="/ticket/api/Tickets"
|
||||
filter="::$ctrl.filter"
|
||||
limit="20"
|
||||
data="tickets"
|
||||
auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div margin-medium>
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar
|
||||
panel="vn-ticket-search-panel"
|
||||
model="model"
|
||||
expr-builder="$ctrl.exprBuilder(param, value)">
|
||||
</vn-searchbar>
|
||||
</vn-card>
|
||||
</div>
|
||||
<vn-card margin-medium-v pad-medium>
|
||||
<table class="vn-grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th translate number>Id</th>
|
||||
<th translate>Salesperson</th>
|
||||
<th translate>Date</th>
|
||||
<th translate>Hour</th>
|
||||
<th translate>Alias</th>
|
||||
<th translate>Province</th>
|
||||
<th translate>State</th>
|
||||
<th translate>Agency</th>
|
||||
<th translate>Warehouse</th>
|
||||
<th translate number>Invoice</th>
|
||||
<th translate number>Route</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="ticket in tickets"
|
||||
class="{{::$ctrl.compareDate(ticket.shipped)}} clickable"
|
||||
ui-sref="ticket.card.summary({id: {{::ticket.id}}})">
|
||||
<th number>{{::ticket.id}}</th>
|
||||
<td>{{::ticket.client.salesPerson.name | dashIfEmpty}}</td>
|
||||
<td>{{::ticket.shipped | date:'dd/MM/yyyy'}}</td>
|
||||
<td>{{::ticket.shipped | date:'HH:mm'}}</td>
|
||||
<td>
|
||||
<span
|
||||
class="link"
|
||||
ng-click="$ctrl.showDescriptor($event, ticket.clientFk)">
|
||||
{{::ticket.nickname}}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{::ticket.address.province.name}}</td>
|
||||
<td>{{::ticket.tracking.state.name}}</td>
|
||||
<td>{{::ticket.agencyMode.name}}</td>
|
||||
<td>{{::ticket.warehouse.name}}</td>
|
||||
<td number>{{::ticket.refFk | dashIfEmpty}}</td>
|
||||
<td number>{{::ticket.routeFk | dashIfEmpty}}</td>
|
||||
<td>
|
||||
<vn-icon-button
|
||||
ng-click="$ctrl.preview($event, ticket)"
|
||||
vn-tooltip="Preview"
|
||||
icon="desktop_windows">
|
||||
</vn-icon-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<vn-client-descriptor-popover vn-id="descriptor"></vn-client-descriptor-popover>
|
||||
</vn-card>
|
||||
<vn-pagination
|
||||
model="model"
|
||||
scroll-selector="ui-view">
|
||||
</vn-pagination>
|
||||
</div>
|
||||
<vn-dialog class="dialog-summary"
|
||||
vn-id="dialog-summary-ticket">
|
||||
<tpl-body>
|
||||
<vn-ticket-summary ticket="$ctrl.ticketSelected"></vn-ticket-summary>
|
||||
</tpl-body>
|
||||
</vn-dialog>
|
|
@ -0,0 +1,65 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
export default class Controller {
|
||||
constructor($scope) {
|
||||
this.$ = $scope;
|
||||
this.ticketSelected = null;
|
||||
|
||||
this.filter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'address',
|
||||
scope: {
|
||||
fields: ['provinceFk'],
|
||||
include: {
|
||||
relation: 'province',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
relation: 'warehouse',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}, {
|
||||
relation: 'agencyMode',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}, {
|
||||
relation: 'tracking',
|
||||
scope: {
|
||||
fields: ['stateFk'],
|
||||
include: {
|
||||
relation: 'state',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
relation: 'client',
|
||||
scope: {
|
||||
fields: ['salesPersonFk'],
|
||||
include: {
|
||||
relation: 'salesPerson',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
order: 'shipped DESC'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope'];
|
||||
|
||||
ngModule.component('vnClaimIndex', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
#Ordenar alfabeticamente
|
||||
|
||||
|
||||
#sections
|
||||
Claims: Reclamaciones
|
||||
List: Listado
|
||||
Summary: Vista previa
|
|
@ -0,0 +1,5 @@
|
|||
import {ng} from 'vendor';
|
||||
import 'core';
|
||||
|
||||
const ngModule = ng.module('claim', ['vnCore']);
|
||||
export default ngModule;
|
|
@ -8,3 +8,4 @@ salix: []
|
|||
#route: []
|
||||
ticket: [item, client]
|
||||
order: [item, ticket]
|
||||
claim: []
|
||||
|
|
|
@ -5,9 +5,10 @@ Client Frozen: Cliente congelado
|
|||
Client has debt: Cliente con riesgo
|
||||
Client inactive: Cliente inactivo
|
||||
Client not checked: Cliente no comprobado
|
||||
Clients: Clientes
|
||||
credit: Crédito
|
||||
creditInsurance: Crédito Asegurado
|
||||
Clients: Clientes
|
||||
Claims: Reclamaciones
|
||||
Data saved!: ¡Datos guardados!
|
||||
Home: Inicio
|
||||
Items: Artículos
|
||||
|
@ -16,13 +17,13 @@ Logout: Cerrar sesión
|
|||
Modules access : Acceso a módulos
|
||||
Notifications: Notificaciones
|
||||
name: Nombre
|
||||
Orders: Pedidos
|
||||
phone: Teléfono
|
||||
Preview: Vista previa
|
||||
Production : Producción
|
||||
Profile: Perfil
|
||||
Production : Producción
|
||||
Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones
|
||||
Return to module index: Volver a la página principal del módulo
|
||||
Routes: Rutas
|
||||
What is new: Novedades de la versión
|
||||
Web Account inactive: Sin acceso Web
|
||||
Orders: Pedidos
|
|
@ -12,5 +12,7 @@ export default {
|
|||
ticket:
|
||||
cb => require.ensure([], () => cb(require('ticket'))),
|
||||
order:
|
||||
cb => require.ensure([], () => cb(require('order')))
|
||||
cb => require.ensure([], () => cb(require('order'))),
|
||||
claim:
|
||||
cb => require.ensure([], () => cb(require('claim')))
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
const fs = require('fs-extra');
|
||||
process.on('warning', warning => {
|
||||
console.log(warning.name);
|
||||
console.log(warning.message);
|
||||
|
@ -18,15 +19,25 @@ let environment = require('gulp-env');
|
|||
|
||||
environment(".env.json");
|
||||
|
||||
let serviceList = fs.readdirSync(servicesDir);
|
||||
let serviceSpecs = [
|
||||
'auth/server/**/*[sS]pec.js'
|
||||
];
|
||||
const exclude = ['auth', 'salix'];
|
||||
|
||||
for (let service of serviceList) {
|
||||
try {
|
||||
let serviceDir = fs.readdirSync(`${servicesDir}/${service}`);
|
||||
for (let file of serviceDir) {
|
||||
if (file === 'server' && exclude.indexOf(service) == -1)
|
||||
serviceSpecs.push(`${service}/common/**/*[sS]pec.js`);
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
jasmine.loadConfig({
|
||||
spec_dir: 'services',
|
||||
spec_files: [
|
||||
'auth/server/**/*[sS]pec.js',
|
||||
'client/common/**/*[sS]pec.js',
|
||||
'item/common/**/*[sS]pec.js',
|
||||
'ticket/common/**/*[sS]pec.js',
|
||||
'loopback/common/**/*[sS]pec.js'
|
||||
],
|
||||
spec_files: serviceSpecs,
|
||||
helpers: [
|
||||
'/services/utils/jasmineHelpers.js'
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue