Merge branch 'dev' of http://git.verdnatura.es/salix into dev

This commit is contained in:
Carlos Jimenez 2018-08-07 12:17:50 +02:00
commit 83381b4c70
11 changed files with 227 additions and 11 deletions

1
client/claim/index.js Normal file
View File

@ -0,0 +1 @@
export * from './src';

36
client/claim/routes.json Normal file
View File

@ -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"
}
}
]
}

View File

@ -0,0 +1,7 @@
export * from './module';
import './index/';
/*
import './card';
import './descriptor';
import './summary'; */

View File

@ -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>

View File

@ -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
});

View File

@ -0,0 +1,7 @@
#Ordenar alfabeticamente
#sections
Claims: Reclamaciones
List: Listado
Summary: Vista previa

View File

@ -0,0 +1,5 @@
import {ng} from 'vendor';
import 'core';
const ngModule = ng.module('claim', ['vnCore']);
export default ngModule;

View File

@ -8,3 +8,4 @@ salix: []
#route: [] #route: []
ticket: [item, client] ticket: [item, client]
order: [item, ticket] order: [item, ticket]
claim: []

View File

@ -5,9 +5,10 @@ Client Frozen: Cliente congelado
Client has debt: Cliente con riesgo Client has debt: Cliente con riesgo
Client inactive: Cliente inactivo Client inactive: Cliente inactivo
Client not checked: Cliente no comprobado Client not checked: Cliente no comprobado
Clients: Clientes
credit: Crédito credit: Crédito
creditInsurance: Crédito Asegurado creditInsurance: Crédito Asegurado
Clients: Clientes
Claims: Reclamaciones
Data saved!: ¡Datos guardados! Data saved!: ¡Datos guardados!
Home: Inicio Home: Inicio
Items: Artículos Items: Artículos
@ -16,13 +17,13 @@ Logout: Cerrar sesión
Modules access : Acceso a módulos Modules access : Acceso a módulos
Notifications: Notificaciones Notifications: Notificaciones
name: Nombre name: Nombre
Orders: Pedidos
phone: Teléfono phone: Teléfono
Preview: Vista previa Preview: Vista previa
Production : Producción
Profile: Perfil Profile: Perfil
Production : Producción
Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones 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 Return to module index: Volver a la página principal del módulo
Routes: Rutas Routes: Rutas
What is new: Novedades de la versión What is new: Novedades de la versión
Web Account inactive: Sin acceso Web Web Account inactive: Sin acceso Web
Orders: Pedidos

View File

@ -12,5 +12,7 @@ export default {
ticket: ticket:
cb => require.ensure([], () => cb(require('ticket'))), cb => require.ensure([], () => cb(require('ticket'))),
order: order:
cb => require.ensure([], () => cb(require('order'))) cb => require.ensure([], () => cb(require('order'))),
claim:
cb => require.ensure([], () => cb(require('claim')))
}; };

View File

@ -1,3 +1,4 @@
const fs = require('fs-extra');
process.on('warning', warning => { process.on('warning', warning => {
console.log(warning.name); console.log(warning.name);
console.log(warning.message); console.log(warning.message);
@ -18,15 +19,25 @@ let environment = require('gulp-env');
environment(".env.json"); 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({ jasmine.loadConfig({
spec_dir: 'services', spec_dir: 'services',
spec_files: [ spec_files: serviceSpecs,
'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'
],
helpers: [ helpers: [
'/services/utils/jasmineHelpers.js' '/services/utils/jasmineHelpers.js'
] ]