diff --git a/@salix/app/src/components/main-menu/main-menu.js b/@salix/app/src/components/main-menu/main-menu.js index e9c1e4626..b79f64141 100644 --- a/@salix/app/src/components/main-menu/main-menu.js +++ b/@salix/app/src/components/main-menu/main-menu.js @@ -7,12 +7,11 @@ export const COMPONENT = { template: template, controllerAs: "mainMenu", controller: function() { - this.onLogoutClick = function () - { + this.onLogoutClick = function() { let appName = 'salix'; document.cookie = `${appName}-session=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`; window.location = `/account?api_key=${appName}`; - } + }; } }; module.component(NAME, COMPONENT); diff --git a/@salix/core/src/core.js b/@salix/core/src/core.js index b0b011074..f70bb48e4 100644 --- a/@salix/core/src/core.js +++ b/@salix/core/src/core.js @@ -1,54 +1,54 @@ -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 CARD, directive as CardDirective} from './card/card'; -export {NAME as CARD_MDL, factory as cardMdl} from './card/card.mdl'; -export {NAME as SWITCH, directive as SwitchDirective} from './switch/switch'; -export {NAME as SWITCH_MDL, factory as switchdMdl} from './switch/switch.mdl'; - -export {directive as Popover} from './popover/popover'; -export {factory as PopoverMdl} from './popover/popover.mdl'; -export {directive as Icon} from './icon/icon'; -export {factory as IconMdl} from './icon/icon.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 CARD, directive as CardDirective} from './card/card'; +export {NAME as CARD_MDL, factory as cardMdl} from './card/card.mdl'; +export {NAME as SWITCH, directive as SwitchDirective} from './switch/switch'; +export {NAME as SWITCH_MDL, factory as switchdMdl} from './switch/switch.mdl'; + +export {directive as Popover} from './popover/popover'; +export {factory as PopoverMdl} from './popover/popover.mdl'; +export {directive as Icon} from './icon/icon'; +export {factory as IconMdl} from './icon/icon.mdl'; + +export {NAME as TITLE, COMPONENT as TITLE_COMPONENT} from './title/title'; +export {NAME as SUBTITLE, COMPONENT as SUBTITLE_COMPONENT} from './subtitle/subtitle'; diff --git a/@salix/core/src/module.js b/@salix/core/src/module.js index 98383f185..83c25dd76 100644 --- a/@salix/core/src/module.js +++ b/@salix/core/src/module.js @@ -1,6 +1,6 @@ -import * as vendors from 'vendor'; -import {getModuleName,getVendorDependencies} from './util'; - -const DEPENDENCIES = getVendorDependencies(vendors) -export const NAME = getModuleName('core'); -export const module = vendors.ng.module(NAME,DEPENDENCIES); +import * as vendors from 'vendor'; +import {getModuleName, getVendorDependencies} from './util'; + +const DEPENDENCIES = getVendorDependencies(vendors); +export const NAME = getModuleName('core'); +export const module = vendors.ng.module(NAME, DEPENDENCIES); diff --git a/@salix/core/src/rule.js b/@salix/core/src/rule.js index b7d768f1d..addf815d2 100644 --- a/@salix/core/src/rule.js +++ b/@salix/core/src/rule.js @@ -4,8 +4,8 @@ export const NAME = 'vnRule'; export function directive() { return { restrict: 'A', - link: function (attrs, element) { - } + link: function(attrs, element) { + } }; } module.directive(NAME, directive); diff --git a/@salix/crud/src/client/addresses-data/index.html b/@salix/crud/src/client/addresses-data/index.html new file mode 100644 index 000000000..6ab814f7c --- /dev/null +++ b/@salix/crud/src/client/addresses-data/index.html @@ -0,0 +1,35 @@ +
\ No newline at end of file diff --git a/@salix/crud/src/client/addresses-data/index.js b/@salix/crud/src/client/addresses-data/index.js new file mode 100644 index 000000000..2a5a27d83 --- /dev/null +++ b/@salix/crud/src/client/addresses-data/index.js @@ -0,0 +1,39 @@ +import template from './index.html'; +import {module} from '../../module'; + +export const NAME = 'vnClientAddressesData'; +export const COMPONENT = { + template: template, + controllerAs: 'addressData', + bindings: { + address: '<' + }, + controller: function($http,$stateParams) + { + $http.get(`/client/api/Addresses/${$stateParams.addressId}`).then( + json => this.address = json.data, + json => console.error(json.data.error.message) + ); + + $http.get('/client/api/Agencies').then( + json => this.agencies = json.data, + json => console.error(json.data.error.message) + ); + + $http.get('/client/api/Provinces').then( + json => this.provinces = json.data, + json => console.error(json.data.error.message) + ); + + this.submit = function(){ + $http.post('/client/api/Addresses', this.address).then( + json => console.log(json.statusText), + json => console.error(json.data.error.message) + ); + }; + } + +}; + +COMPONENT.controller.$inject = ['$http' , '$stateParams']; +module.component(NAME, COMPONENT); diff --git a/@salix/crud/src/client/addresses/index.html b/@salix/crud/src/client/addresses/index.html index 71f08c750..6c172b366 100644 --- a/@salix/crud/src/client/addresses/index.html +++ b/@salix/crud/src/client/addresses/index.html @@ -1,7 +1,10 @@