guardar formularios

This commit is contained in:
Javi Gallego 2017-01-02 07:28:36 +01:00
parent 98dada7c8c
commit b7bbf4a8b0
15 changed files with 242 additions and 169 deletions

View File

@ -1,20 +1,20 @@
import {module as _module} from '../module';
import * as resolveFactory from '../resolveDefaultComponents';
import * as normalizerFactory from '../inputAttrsNormalizer';
import * as util from '../util';
const _NAME = 'check';
export const NAME = util.getName(_NAME);
directive.$inject =[resolveFactory.NAME, normalizerFactory.NAME];
export function directive (resolve, normalizer){
return{
require:'E',
template: function(_,attrs){
normalizer.normalize (attrs);
return resolve.getTemplate(_NAME, attrs);
}
}
}
_module.directive(NAME,directive);
import {module as _module} from '../module';
import * as resolveFactory from '../resolveDefaultComponents';
import * as normalizerFactory from '../inputAttrsNormalizer';
import * as util from '../util';
const _NAME = 'check';
export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME];
export function directive(resolve, normalizer) {
return {
require: 'E',
template: function(_, attrs) {
normalizer.normalize(attrs);
return resolve.getTemplate(_NAME, attrs);
}
};
}
_module.directive(NAME, directive);

View File

@ -1,45 +1,45 @@
import mtOverride from './mdl-override.css';
export * from './module'
export * from './util'
export {SplitingRegister as splitingRegister} from './splitingregister'
export {NAME as RESOLVEDEFAULTCOMPONENT, ResolveDefaultComponent} from './resolveDefaultComponents'
export {NAME as INTERPOLATE, Interpolate} from './interpolate'
export {NAME as ROUTES_LOADER, RoutesLoader} from './routesLoader'
export {NAME as FOCUS, directive as Focus} from './focus'
export {NAME as RULE, directive as Rule} from './rule'
export {NAME as BUTTON, directive as ButtonDirective} from './button/button'
export {NAME as BUTTON_MDL, factory as buttonMdl} from './button/button.mdl'
export {NAME as BUTTON_BT, factory as buttonBt} from './button/button.bt'
export {NAME as CHECK,directive as CheckDirective} from './check/check'
export {NAME as CHECK_MDL, factory as checknMdl} from './check/check.mdl'
export {NAME as CHECK_BT, factory as checkBt} from './check/check.bt'
export {NAME as RADIO,directive as RadioDirective} from './radio/radio'
export {NAME as RADIO_MDL, factory as radionMdl} from './radio/radio.mdl'
export {NAME as RADIO_BT, factory as radioBt} from './radio/radio.bt'
export {NAME as TEXTFIELD, directive as TextfieldDirective} from './textfield/textfield'
export {NAME as TEXTFIELD_MDL, factory as textfieldMdl} from './textfield/textfield.mdl'
export {NAME as TEXTFIELD_BT, factory as textfieldBt} from './textfield/textfield.bt'
export {NAME as LABEL, directive as LabelDirective} from './label/label'
export {NAME as LABEL_MDL, factory as labelMdl} from './label/label.mdl'
export {NAME as LABEL_BT, factory as labelBt} from './label/label.bt'
export {NAME as ICON_BUTTON, directive as IconButtonDirective} from './icon-button/icon-button'
export {NAME as ICON_BUTTON_MDL, factory as iconButtonMdl} from './icon-button/icon-button.mdl'
export {NAME as PASSWORD, directive as PasswordDirective} from './password/password'
export {NAME as PASSWORD_MDL,factory as passwordMdl} from './password/password.mdl'
export {NAME as SUBMIT, directive as SubmitDirective} from './submit/submit'
export {NAME as SUBMIT_MDL, factory as submitMdl} from './submit/submit.mdl'
export {NAME as SNACKBAR, directive as SnackbarDirective} from './snackbar/snackbar'
export {NAME as SNACKBAR_MDL, factory as snackbarMdl} from './snackbar/snackbar.mdl'
export {NAME as SPINNER, directive as SpinnerDirective} from './spinner/spinner'
export {NAME as SPINNER_MDL, factory as spinnerMdl} from './spinner/spinner.mdl'
export {NAME as COMBO, directive as ComboDirective} from './combo/combo'
export {NAME as COMBO_MDL, factory as comboMdl} from './combo/combo.mdl'
export {NAME as DATE_PICKER, directive as DatePickerDirective} from './date-picker/date-picker'
export {NAME as DATE_PICKER_MDL, factory as datePickerMdl} from './date-picker/date-picker.mdl'
export {NAME as TITLE, COMPONENT as TITLE_COMPONENT} from './title/title'
export {NAME as SUBTITLE, COMPONENT as SUBTITLE_COMPONENT} from './subtitle/subtitle'
require('./mdl-override.css');
export * from './module';
export * from './util';
export {SplitingRegister as splitingRegister} from './splitingregister';
export {NAME as RESOLVEDEFAULTCOMPONENT, ResolveDefaultComponent} from './resolveDefaultComponents';
export {NAME as INTERPOLATE, Interpolate} from './interpolate';
export {NAME as ROUTES_LOADER, RoutesLoader} from './routesLoader';
export {NAME as FOCUS, directive as Focus} from './focus';
export {NAME as RULE, directive as Rule} from './rule';
export {NAME as BUTTON, directive as ButtonDirective} from './button/button';
export {NAME as BUTTON_MDL, factory as buttonMdl} from './button/button.mdl';
export {NAME as BUTTON_BT, factory as buttonBt} from './button/button.bt';
export {NAME as CHECK, directive as CheckDirective} from './check/check';
export {NAME as CHECK_MDL, factory as checknMdl} from './check/check.mdl';
export {NAME as CHECK_BT, factory as checkBt} from './check/check.bt';
export {NAME as RADIO, directive as RadioDirective} from './radio/radio';
export {NAME as RADIO_MDL, factory as radionMdl} from './radio/radio.mdl';
export {NAME as RADIO_BT, factory as radioBt} from './radio/radio.bt';
export {NAME as TEXTFIELD, directive as TextfieldDirective} from './textfield/textfield';
export {NAME as TEXTFIELD_MDL, factory as textfieldMdl} from './textfield/textfield.mdl';
export {NAME as TEXTFIELD_BT, factory as textfieldBt} from './textfield/textfield.bt';
export {NAME as LABEL, directive as LabelDirective} from './label/label';
export {NAME as LABEL_MDL, factory as labelMdl} from './label/label.mdl';
export {NAME as LABEL_BT, factory as labelBt} from './label/label.bt';
export {NAME as ICON_BUTTON, directive as IconButtonDirective} from './icon-button/icon-button';
export {NAME as ICON_BUTTON_MDL, factory as iconButtonMdl} from './icon-button/icon-button.mdl';
export {NAME as PASSWORD, directive as PasswordDirective} from './password/password';
export {NAME as PASSWORD_MDL, factory as passwordMdl} from './password/password.mdl';
export {NAME as SUBMIT, directive as SubmitDirective} from './submit/submit';
export {NAME as SUBMIT_MDL, factory as submitMdl} from './submit/submit.mdl';
export {NAME as SNACKBAR, directive as SnackbarDirective} from './snackbar/snackbar';
export {NAME as SNACKBAR_MDL, factory as snackbarMdl} from './snackbar/snackbar.mdl';
export {NAME as SPINNER, directive as SpinnerDirective} from './spinner/spinner';
export {NAME as SPINNER_MDL, factory as spinnerMdl} from './spinner/spinner.mdl';
export {NAME as COMBO, directive as ComboDirective} from './combo/combo';
export {NAME as COMBO_MDL, factory as comboMdl} from './combo/combo.mdl';
export {NAME as DATE_PICKER, directive as DatePickerDirective} from './date-picker/date-picker';
export {NAME as DATE_PICKER_MDL, factory as datePickerMdl} from './date-picker/date-picker.mdl';
export {NAME as TITLE, COMPONENT as TITLE_COMPONENT} from './title/title';
export {NAME as SUBTITLE, COMPONENT as SUBTITLE_COMPONENT} from './subtitle/subtitle';

View File

@ -4,12 +4,12 @@ export const NAME = 'vnFocus';
export function directive() {
return {
restrict: 'A',
link: function (scope, elements, attrs){
link: function(scope, elements, attrs) {
let element = elements[0];
element.focus();
let len = element.value ? element.value.length : 0;
element.setSelectionRange(0, len);
//element.select();
// element.select();
}
};
}

View File

@ -2,8 +2,7 @@ import {module} from './module';
export const NAME = 'vnInputAttrsNormalizer';
export class InputAttrsNormalizer {
constructor () {}
$get(){
$get() {
return {
normalize: function(attrs) {
// FIXME: No siempre se pasan estos atributos, ej: searchbar
@ -25,7 +24,7 @@ export class InputAttrsNormalizer {
attrs.focus = 'vn-focus';
}
};
}
}
}
module.provider (NAME, () => new InputAttrsNormalizer ())
module.provider(NAME, () => new InputAttrsNormalizer());

View File

@ -11,7 +11,7 @@
<vn-horizontal>
<vn-textfield vn-one label="Teléfono" model="basicData.client.telefono" entity="basicData"></vn-textfield>
<vn-textfield vn-one label="Fax" model="basicData.client.fax" entity="basicData"></vn-textfield>
<vn-textfield vn-one label="Email" fiemodelld="basicData.client.email" entity="basicData"></vn-textfield>
<vn-textfield vn-one label="Email" model="basicData.client.email" entity="basicData"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-combo vn-one label="Comercial" model="basicData.client.salesPerson" entity="basicData">

View File

@ -10,21 +10,21 @@ export const COMPONENT = {
controller: function($http, $stateParams) {
this.client = null;
$http.get(`/client/api/Clients/${$stateParams.id}`).then(
(json) => {
this.client = json.data;
json => {
this.client = json.data;
this.descriptor = {
clientId: this.client.id,
name: this.client.name,
phone: this.client.phone
};
},
(json) => console.error (json.data.error.message)
json => console.error(json.data.error.message)
);
this.items = [];
routes['client'].routes.forEach ((i) => {
routes.client.routes.forEach(i => {
if (i.description)
this.items.push ({
this.items.push({
description: i.description,
icon: i.icon,
href: i.state

View File

@ -1,40 +1,40 @@
<form ng-submit="frm.isValid && fiscal.submit()" pad-large>
<form ng-submit="fiscal.submit()" pad-large>
<vn-title>Datos fiscales y de facturación</vn-title>
<vn-horizontal>
<vn-check vn-one label="Cliente activo" field="active" entity="fiscal"></vn-check>
<vn-check vn-one label="Facturar" field="invoice" entity="fiscal"></vn-check>
<vn-check vn-one label="Factura impresa" field="mailInvoice" entity="fiscal"></vn-check>
<vn-horizontal>
<vn-check vn-one label="Cliente activo" model="fiscal.client.active" rule="client.active" name="active"></vn-check>
<vn-check vn-one label="Facturar" field="hasToInvoice" entity="fiscal"></vn-check>
<vn-check vn-one label="Factura impresa" field="invoiceByEmail" entity="fiscal"></vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-two label="Domicilio fiscal" field="consignee" entity="fiscal"></vn-textfield>
<vn-textfield vn-one label="Municipio" field="city" entity="fiscal"></vn-textfield>
<vn-textfield vn-two label="Domicilio fiscal" model="fiscal.client.street" rule="client.street" name="street"></vn-textfield>
<vn-textfield vn-one label="Municipio" model="fiscal.client.city" rule="client.city" name="city"></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Código postal" field="postcode" entity="fiscal"></vn-textfield>
<vn-combo vn-one label="Provincia" field="province" entity="fiscal"></vn-combo>
<vn-textfield vn-one label="Código postal" model="fiscal.client.postcode" rule="client.postcode" name="postcode"></vn-textfield>
<vn-combo vn-one label="Provincia" model="fiscal.client.province" rule="client.province" name="province"></vn-combo>
<vn-combo vn-one label="País" field="country" entity="fiscal">
<option value="1">Comercial 1</option>
<option value="2">Comercial 2</option>
</vn-combo>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Teléfono Fijo" field="phone" entity="fiscal"></vn-textfield>
<vn-textfield vn-one label="Teléfono Movil" field="mobile" entity="fiscal"></vn-textfield>
<vn-textfield vn-one label="Correo electrónico" field="email" entity="fiscal"></vn-textfield>
<vn-textfield vn-one label="Teléfono Fijo" model="fiscal.client.phone" rule="client.phone" name="phone"></vn-textfield>
<vn-textfield vn-one label="Teléfono Movil" model="fiscal.client.mobile" rule="client.mobile" name="mobile"></vn-textfield>
<vn-textfield vn-one label="Correo electrónico" model="fiscal.client.email" rule="client.email" name="email"></vn-textfield>
</vn-horizontal>
<hr class="border-dashed-top"/>
<h5 vn-one style="margin-top: 0;">Información de facturación</h5>
<vn-horizontal>
<vn-combo vn-two label="Forma de pago" field="payMethod" entity="fiscal"></vn-combo>
<vn-textfield vn-one label="Vencimiento" field="expiration" entity="fiscal"></vn-textfield>
<vn-check vn-three label="Recargo de equivalencia" field="er" entity="fiscal"></vn-check>
<vn-textfield vn-one label="Vencimiento" model="fiscal.client.dueDay" rule="client.dueDay" name="dueDay"></vn-textfield>
<vn-check vn-three label="Recargo de equivalencia" model="fiscal.client.surcharge" rule="client.surcharge" name="surcharge"></vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-textfield vn-one label="Crédito" field="credit" entity="fiscal"></vn-textfield>
<vn-textfield vn-one label="CyC" field="cyc" entity="fiscal"></vn-textfield>
<vn-textfield vn-one label="IAE" field="iae" entity="fiscal"></vn-textfield>
<vn-textfield vn-three label="IBAN" field="iban" entity="fiscal"></vn-textfield>
<vn-textfield vn-one label="Crédito" model="fiscal.client.credit" rule="client.credit" name="credit"></vn-textfield>
<vn-textfield vn-one label="CyC" model="fiscal.client.cyc" rule="client.cyc" name="cyc"></vn-textfield>
<vn-textfield vn-one label="IAE" model="fiscal.client.gestdoc" rule="client.gestdoc" name="gestdoc"></vn-textfield>
<vn-textfield vn-three label="IBAN" model="fiscal.client.iban" rule="client.iban" name="iban"></vn-textfield>
</vn-horizontal>
<hr class="border-dashed-top"/>
<h5 style="margin-top: 0;">Documentación</h5>

View File

@ -5,9 +5,19 @@ export const NAME = 'vnClientFiscalData';
export const COMPONENT = {
template: template,
controllerAs: 'fiscal',
bindings: {
client: '<'
},
controller: function($http) {
$http.get('/client/api/SalesPeople').then(
json => {
this.sales = json.data;
console.log(this.sales);
},
json => console.error(json.data.error.message)
);
this.submit = function() {
$http.post('/client/api/Clients', this.model).then(
$http.put('/client/api/Clients', this.client).then(
json => console.log(json.statusText),
json => console.error(json.data.error.message)
);

View File

@ -25,6 +25,9 @@
url: "/fiscal-data",
state: "clientCard.fiscalData",
component: "vn-client-fiscal-data",
params: {
client: "card.client"
},
description: "Datos facturación",
icon: "assignment"
},
@ -39,6 +42,9 @@
url: "/web-access",
state: "clientCard.webAccess",
component: "vn-client-web-access",
params: {
client: "card.client"
},
description: "Acceso web",
icon: "language"
},

View File

@ -1,6 +1,6 @@
<form ng-submit="web.submit()" pad-large>
<vn-title>Acceso Web</vn-title>
<vn-check label="Acceso web activo" field="active" entity="web"></vn-check>
<vn-textfield label="Usuario" class="padd-medium-top" field="user" entity="web"></vn-textfield>
<vn-check label="Acceso web activo" model="web.client.active" rule="client.active" name="active"></vn-check>
<vn-textfield label="Usuario" class="padd-medium-top" model="web.client.user" focus></vn-textfield>
<vn-submit label="Guardar"></vn-submit>
</form>

View File

@ -3,7 +3,19 @@ import {module} from '../../module';
export const NAME = 'vnClientWebAccess';
export const COMPONENT = {
template: template,
controllerAs: 'web',
template: template
bindings: {
client: '<'
},
controller: function($http) {
this.submit = function() {
$http.put('/client/api/Clients', this.client).then(
json => console.log(json.statusText),
json => console.error(json.data.error.message)
);
};
}
};
module.component(NAME, COMPONENT);
COMPONENT.controller.$inject = ['$http'];
module.component(NAME, COMPONENT);

View File

@ -13,86 +13,86 @@ var webpackConfig = require('./webpack.config.js');
// Clean
var buildDir = '../services/nginx/static'
var buildDir = '../services/nginx/static';
gulp.task('clean', function() {
return del(buildDir +'/*', {force: true});
return del(buildDir + '/*', {force: true});
});
// Spliting
var splitingDir = './app/src/spliting';
var splitingFiles = splitingDir +'/*';
var splitingFiles = splitingDir + '/*';
gulp.task('spliting', function() {
var jsonDeps = fs.readFileSync(splitingDir +'/deps.json');
var modules = JSON.parse(jsonDeps);
var jsonDeps = fs.readFileSync(splitingDir + '/deps.json');
var modules = JSON.parse(jsonDeps);
var importTpl = fs.readFileSync(splitingDir +'/import.tpl.js', 'utf8');
var requireTpl = fs.readFileSync(splitingDir +'/require.tpl.js', 'utf8');
var importTpl = fs.readFileSync(splitingDir + '/import.tpl.js', 'utf8');
var requireTpl = fs.readFileSync(splitingDir + '/require.tpl.js', 'utf8');
for(var modName in modules)
for (var modName in modules)
{
var deps = modules[modName];
var splitFile = './'+ modName +'/src/spliting.js';
try {
fs.unlinkSync(splitFile);
}
catch(e) {}
fs.appendFileSync(splitFile, importTpl);
var i = deps.length;
while(i--)
fs.appendFileSync(splitFile,
var deps = modules[modName];
var splitFile = './' + modName + '/src/spliting.js';
try {
fs.unlinkSync(splitFile);
}
catch (e) {}
fs.appendFileSync(splitFile, importTpl);
var i = deps.length;
while (i--)
fs.appendFileSync(splitFile,
requireTpl.replace(/\$module/g, deps[i]));
}
}
});
// Webpack
gulp.task('webpack', ['spliting'], function(callback) {
var myDevConfig = Object.create(webpackConfig);
myDevConfig.debug = true;
var myDevConfig = Object.create(webpackConfig);
myDevConfig.debug = true;
var devCompiler = webpack(myDevConfig);
var devCompiler = webpack(myDevConfig);
devCompiler.run(function(err, stats) {
if(err) throw new gutil.PluginError('webpack', err);
gutil.log('[webpack]', stats.toString({colors: true}));
callback();
});
devCompiler.run(function(err, stats) {
if (err) throw new gutil.PluginError('webpack', err);
gutil.log('[webpack]', stats.toString({colors: true}));
callback();
});
});
gulp.task('webpack-dev-server', ['spliting'], function() {
var myConfig = Object.create(webpackConfig);
myConfig.debug = true;
var myConfig = Object.create(webpackConfig);
myConfig.debug = true;
for (var entry in myConfig.entry)
myConfig.entry[entry]
for (var entry in myConfig.entry)
myConfig.entry[entry]
.unshift('webpack-dev-server/client?http://0.0.0.0:8081/');
var devServer = new WebpackDevServer(webpack(myConfig), {
publicPath: '/',
contentBase: buildDir,
quiet: false,
noInfo: false,
//hot: true,
stats: {
assets: true,
colors: true,
version: false,
hash: false,
timings: true,
chunks: false,
chunkModules: false
}
})
var devServer = new WebpackDevServer(webpack(myConfig), {
publicPath: '/',
contentBase: buildDir,
quiet: false,
noInfo: false,
// hot: true,
stats: {
assets: true,
colors: true,
version: false,
hash: false,
timings: true,
chunks: false,
chunkModules: false
}
})
.listen(8081, '0.0.0.0', function(err) {
if(err) throw new gutil.PluginError('webpack-dev-server', err);
gutil.log('[webpack-dev-server]', 'Listening');
});
if (err) throw new gutil.PluginError('webpack-dev-server', err);
gutil.log('[webpack-dev-server]', 'Listening');
});
});
// Routes
@ -100,17 +100,17 @@ gulp.task('webpack-dev-server', ['spliting'], function() {
var routeFiles = './crud/**/routes.js';
gulp.task('routes', function() {
var fileTpl = '\n"<%=dirname%>": <%=contents%>';
var globalTpl = 'var routes = {<%=contents%>\n}';
var regex = new RegExp('^src/(.*)/routes\.js$');
var fileTpl = '\n"<%=dirname%>": <%=contents%>';
var globalTpl = 'var routes = {<%=contents%>\n}';
var regex = new RegExp('^src/(.*)/routes\.js$');
function cb(file) {
var relative = file.relative.replace('\\', '/');
var dirname = relative.match(regex)[1];
return {dirname: dirname};
}
function cb(file) {
var relative = file.relative.replace(/\\/g, '/');
var dirname = relative.match(regex)[1];
return {dirname: dirname};
}
return gulp.src(routeFiles)
return gulp.src(routeFiles)
.pipe(wrap(fileTpl, cb))
.pipe(concat('salix.routes.js', {newLine: ','}))
.pipe(wrap(globalTpl))
@ -121,16 +121,16 @@ gulp.task('routes', function() {
// Watch
gulp.task('watch', function() {
gulp.watch(routeFiles, ['routes']);
gulp.watch(splitingFiles, ['spliting']);
gulp.watch(routeFiles, ['routes']);
gulp.watch(splitingFiles, ['spliting']);
});
// Default
gulp.task('build', ['clean'], function() {
return gulp.start('routes', 'webpack');
return gulp.start('routes', 'webpack');
});
gulp.task('default', ['clean'], function() {
return gulp.start('watch', 'routes', 'webpack-dev-server');
return gulp.start('watch', 'routes', 'webpack-dev-server');
});

View File

@ -14,8 +14,8 @@
"NUf7o684TmteojFX9KmPOpaDLthjP5Def4wuy83Yjv31i43HHiWgV3FyBp6pX8Ue": "{\"id\":\"NUf7o684TmteojFX9KmPOpaDLthjP5Def4wuy83Yjv31i43HHiWgV3FyBp6pX8Ue\",\"ttl\":1209600,\"created\":\"2016-11-21T11:06:11.113Z\",\"userId\":1}"
},
"Client": {
"12": "{\"name\":\"Cliente 2\",\"id\":12,\"fi\":\"1111111111\",\"salesPerson\":\"2\"}",
"14": "{\"name\":\"cliente 1\",\"id\":14}"
"12": "{\"name\":\"fa\",\"id\":12,\"fi\":\"1111111111\",\"salesPerson\":\"2\",\"telefono\":\"654654654\",\"socialName\":\"asdfasdfasdf\",\"active\":true,\"user\":\"gva\",\"fax\":\"hn\",\"phone\":\"45745675\",\"email\":\"asdf@osij.com\",\"surcharge\":true,\"cyc\":\"2345\",\"credit\":1000,\"iban\":\"2352345234523452345\",\"street\":\"asdfasdf\",\"city\":\"algemesi\",\"postcode\":\"46680\",\"mobile\":\"654654654\",\"dueDay\":\"4\",\"gestdoc\":\"23452343\"}",
"14": "{\"name\":\"cliente f\",\"id\":14,\"street\":\"Aaaaaaaaaa\",\"fi\":\"20420\",\"socialName\":\"sdfg\",\"fax\":\"sdfg\",\"dischargeDate\":\"sdfg\",\"telefono\":\"sdfg\",\"salesPerson\":\"2\",\"email\":\"sdfg\",\"city\":\"asdf\",\"postcode\":\"asdf\",\"phone\":\"asdf\",\"mobile\":\"asdf\",\"credit\":2345,\"cyc\":123,\"iban\":\"asdf\",\"dueDay\":345,\"gestdoc\":2435,\"surcharge\":true}"
},
"PaymentMethod": {
"1": "{\"name\":\"Tarjeta\",\"id\":1}",

View File

@ -24,6 +24,28 @@
"contact": {
"type": "string"
},
"street": {
"type": "string",
"required": "true"
},
"consignee": {
"type": "string",
"required": "true"
},
"city": {
"type": "string",
"required": "true"
},
"postcode": {
"type": "string"
},
"province": {
"type": "Number"
},
"country": {
"type": "string",
"required": "true"
},
"email": {
"type": "string"
},
@ -39,7 +61,7 @@
"credit": {
"type": "Number"
},
"creditAndCaution": {
"cyc": {
"type": "Number"
},
"iban": {
@ -48,6 +70,12 @@
"payMethod": {
"type": "string"
},
"dueDay": {
"type": "Number"
},
"gestdoc":{
"type":"Number"
},
"surcharge": {
"type": "boolean",
"description": "The client has equivalence surcharge"

View File

@ -0,0 +1,18 @@
{
"name": "account",
"base": "PersistedModel",
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
"required": "true"
},
"active": {
"type": "boolean"
}
}
}