Skip to content

Instantly share code, notes, and snippets.

rafael-metractive

Block or report user

Report or block rafael-metractive

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:bd0ae7f133ee6267763dd91b26e0a55f
function getAdditionalData(subTags, value) {
let additionalData = {}
let subPosition = 0
let subTotalStep = 2
let subSize = 0
subTags.map(subTag => {
additionalData[subTag] = { name: subTag }
additionalData[subTag].id = value.slice(subPosition, subTotalStep)
View helper-hw.js
// Inspired by: https://github.com/davidchambers/Base64.js/blob/master/base64.js
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
const Base64 = {
btoa: (input:string = '') => {
let str = input;
let output = '';
for (let block = 0, charCode, i = 0, map = chars;
View reservation-actions.js
_renderTopBarActions() {
if(!this.props.dashboardReservation.status || this.props.dashboardReservation.status == 4)
return null
if(this.props.dashboardReservation.status == 1)
return (
<React.Fragment>
<button
className='btn btn-outline-primary'
onClick={() => this.props.cancelReservation(this.props.match.params.id)}
You can’t perform that action at this time.