This file contains 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
import React, { Component } from 'react' | |
import { Link } from 'react-router-dom' | |
import { connect } from 'react-redux' | |
import './userInfo.scss' | |
class UserInfo extends Component { | |
constructor(props) { | |
super(props); | |
this.setWrapperRef = this.setWrapperRef.bind(this); |
This file contains 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
updateDates = () => { | |
const date = this.state.currentDate.startOf('month') | |
const delta = Math.abs(1-date.day()) | |
let daysInMonth = date.daysInMonth() + delta | |
date.subtract(delta+1, 'd') | |
const arrayOfDays = [] | |
while(daysInMonth > 0){ | |
let dateNew = Moment(date.add(1, 'd')) | |
arrayOfDays.push(dateNew) | |
daysInMonth-=1 |
This file contains 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 regExp = /^(\+7)[\s]\([0-9]{3}\)[\s][0-9]{3}\-[0-9]{2}\-[0-9]{2}/; |
This file contains 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
<IMaskInput | |
name='phone' | |
mask='+{7} (000) 000-00-00' | |
radix="." | |
value={this.state.phone} | |
unmask="true" // true|false|'typed' | |
onAccept={ | |
// depending on prop above first argument is | |
// `value` if `unmask=false`, | |
// `unmaskedValue` if `unmask=true`, |
This file contains 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
downloadHt = (e) => { | |
const { token, setToken, taskId } = this.props | |
const el = e.target | |
this.ApiService.downloadHt(token, setToken, taskId, this.state.export) | |
.then(r => { | |
if(r === 'error'){ | |
el.innerHTML = 'Произошла ошибка' | |
setTimeout(() => { | |
el.innerHTML = 'Распечатать' | |
return |
This file contains 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
import React, {Component} from 'react' | |
import Moment from 'moment/min/moment-with-locales' | |
import './Infoblock.css' | |
export default class Infoblock extends Component{ | |
state = { |
This file contains 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
_isNumber = (n) => { | |
return !isNaN(parseFloat(n)) && isFinite(n); | |
} | |
adaptPhone = (val) => { | |
const deleteLastChar = (val) =>{ | |
val = val.substring(0, val.length - 1); | |
if(val[0] != '+'){ | |
val = '+7'+val; | |
} |
This file contains 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 validatePhoneInput(selector){ | |
$(document).delegate(selector, "keyup", function(e){ | |
function isNumber(n) { | |
return !isNaN(parseFloat(n)) && isFinite(n); | |
} | |
function deleteLastChar(val){ | |
val = val.substring(0, val.length - 1); | |
if(val[0] != '+'){ |
This file contains 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
$(document).delegate('.courses-module.my .typical-course-card', "click", function(e){ | |
clearAll(); | |
if (!History.enabled) { | |
return; | |
} | |
e.preventDefault(); |
This file contains 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
'.source.js': | |
'anonymous function': | |
'prefix': 'f' | |
'body': 'function(){$1}' | |
'jquery click function': | |
'prefix': 'c' | |
'body': """ | |
.click(function(){ | |
${1} | |
}); |
NewerOlder