This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "editor.tabSize": 2, | |
| "editor.insertSpaces": true, | |
| "editor.detectIndentation": false, | |
| "editor.formatOnSave": false, | |
| // "css.fileExtensions": [ | |
| // "css", | |
| // "scss", | |
| // "less" | |
| // ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "editor.tabSize": 2, | |
| "editor.insertSpaces": true, | |
| "editor.detectIndentation": false, | |
| "editor.formatOnSave": false, | |
| // "css.fileExtensions": [ | |
| // "css", | |
| // "scss", | |
| // "less" | |
| // ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| angular.module("BauVoiceApp").directive("customValidation", function() { | |
| return { | |
| require: "ngModel", | |
| link: function(scope, element, attrs, modelCtrl) { | |
| modelCtrl.$parsers.push(function(inputValue) { | |
| const numberPattern = /\d+/g; | |
| let transformedInput = inputValue.match(numberPattern)[0]; | |
| if (transformedInput != inputValue) { | |
| modelCtrl.$setViewValue(transformedInput); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let a = angular.element($0).injector(); | |
| a.get("formDirective"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function maybe(fn) | |
| return function _maybe(...args) { | |
| // Note that the == is deliberate. | |
| if ((args.length === 0) || args.some(a => (a == null)) { | |
| return undefined; | |
| } | |
| return fn.apply(this, args); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <style> | |
| th { | |
| cursor: pointer; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const removeProperties = (object, ...keys) => | |
| Object.entries(object).reduce( | |
| (prev, [key, value]) => ({ | |
| ...prev, | |
| ...(!keys.includes(key) && { [key]: value }), | |
| }), | |
| {} | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.element(document).injector().get(‘service.name’); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const clearFieldOfObject = obj => { | |
| Object.keys(obj).map(key => { | |
| if ( | |
| key !== "status_in_work" && | |
| key !== "status_paid" && | |
| key !== "status_wait_mount" && | |
| key !== "status_delivered" && | |
| key !== "status_mounted" && | |
| key !== "status_fullfilled" | |
| ) { |