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 getValidationFields() { | |
return { | |
body: { | |
companies_ids: joi.array().required(), | |
start_time: joi.date().required(), | |
duration: joi.date().required(), | |
contact_info: { | |
person_name: joi.string().required(), | |
phone: joi.string().required(), | |
email: joi.string().email() |
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
Aren't gists great! |
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
modules.define( | |
'baby-loris-api', | |
[ | |
'inherit', | |
'jquery', | |
'vow', | |
'baby-loris-api-error' | |
], | |
function ( | |
provide, |
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
var inherit = require('inherit'); | |
/** | |
* Asker error. | |
* | |
* @param {Error} e Terror instance. | |
* @param {Object} askerConfig Params for asker which were used for this very breaked request | |
* @param {String} message Optional human-readable description of the error. | |
*/ | |
var AskError = inherit(Error, { |
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
modules.define( | |
'add-analyst', | |
['inherit', 'y-block', 'y-button', 'y-input', 'baby-loris-api'], | |
function (provide, inherit, YBlock, YButton, YInput, Api) { | |
var AddAnalyst = inherit(YBlock, { | |
__constructor: function () { | |
this.__base.apply(this, arguments); | |
// Указывает, где искать ручки получения/передачи данных | |
this._api = new Api('/api/'); |
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
modules.define( | |
'add-analyst', | |
['inherit', 'y-block'], | |
function (provide, inherit, YBlock) { | |
var AddAnalyst = inherit(YBlock, { | |
__constructor: function () { | |
this.__base.apply(this, arguments); | |
var input = this._findElement('input'); | |
var button = this._findElement('button'); |