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
| _.reduce(req.body.labels, | |
| (promise, requestLabel) => promise.then( | |
| () => { | |
| var label = new model.Label(requestLabel); | |
| label.branch = DISTRIBUTION_BRANCH_ID; | |
| return labelsService.createLabel(label); | |
| } | |
| ), | |
| Promise.resolve() | |
| ).then( |
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
| <div ng-repeat="alert in $ctrl.alerts"> | |
| <div>{{alert.message}}</div> | |
| </div> |
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
| router.post('/:id/picture', | |
| global.app.data.buckets({ | |
| bucket: 'pip-recreational-centers', | |
| nameSuffix: req => '_' + req.params.id + '.png' | |
| }), | |
| (req, res, next) => model.RecreationalCenter.findById(req.params.id).then( | |
| recreationCenter => { | |
| recreationCenter.picture = req.resource.Location; | |
| return playlist.save(); | |
| } |
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
| <div ng-hide="$ctrl.showUploadPicture" class="row form-group"> | |
| <div class="col-xs-12"> | |
| <div ng-show="$ctrl.currentPicture"> | |
| <img ng-src="{{$ctrl.currentPicture}}" alt="{{$ctrl.course.name}}"/> | |
| </div> | |
| <br/> | |
| <br/> | |
| <a ng-hide="$ctrl.showUploadPicture" ng-click="$ctrl.showUploadPicture = true"> | |
| <span class="fa fa-cloud-upload"></span> | |
| <span>Subir imagen</span> |
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
| /*@ngInject*/ | |
| export default function pingService($http, endpoint) { | |
| return { | |
| ping: () => $http.get(`${endpoint}ping`).then(response => response.data) | |
| }; | |
| } |
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
| #!/bin/sh | |
| #husky 0.13.1 | |
| command_exists () { | |
| command -v "$1" >/dev/null 2>&1 | |
| } | |
| load_nvm () { | |
| export $1=$2 | |
| [ -s "$1/nvm.sh" ] && . $1/nvm.sh |
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 {reduce} = require('async'); | |
| this.sumColumn = function (rowsNumber, columnPosition,callback) { | |
| var total = 0, value; | |
| reduce(rowsNumber, 0, (acum, i) => { | |
| browser.getText(ELEMENTS.ROW.locator + ':nth-child(' + i + ') td:nth-child(' + columnPosition + ')', | |
| result => { | |
| value = parseInt(JSON.stringify(result.value).replace(/\D/g, '')); | |
| callback(null, acum + (value || 0)); | |
| console.log('counting... '+acum); |
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
| <div ng-switch="$ctrl.resolve.chapterZero.homeOpenDoor"> | |
| <p ng-switch-when="1">La vivienda esta deshabitada</p> | |
| <p ng-switch-when="16">El hogar abrió la puera, recibio material</p> | |
| <p ng-switch-default>{{::$ctrl.resolve.chapterZero.homeOpenDoor}}</p> | |
| </div> |
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
| export default function* root() { | |
| yield [ | |
| fork(fetchByParams) | |
| ] |
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
| export default class MegaValidator extends Validator { | |
| constructor(validationLogic) { | |
| super(); | |
| if (!isFunction(validationLogic)) { | |
| throw new Error('Validator must have a method for validating.'); | |
| } | |
| this.validationLogic = validationLogic; | |
| } | |
| forThis(entity) { |