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
// nextInLine = NextInLine.Init({ | |
// ...etc. | |
// }) | |
// After this /\ | |
nextInLine.events.on("Filters.componentDidSubmit", ()=>{ | |
console.log("Filters DID SUBMIT") | |
}) | |
nextInLine.events.on("TimeSlots.componentDidSubmit", ()=>{ |
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
var param=window.location.host,page=param+window.location.pathname; | |
function callKontakScripts(){ | |
var e=httpGet("https://dev-js-management.getkontak.com/api/v2/chat/snippet?param="+param),e=JSON.parse(e); | |
""!==e&&e.forEach(function(e){var t; | |
null!==e.pages&&!e.pages.includes(page)||(t=e.code.replace(/<\/script>/,"").replace(/<script>/,""),(e=document.createElement("script")).innerHTML=t,document.body.appendChild(e))})}function httpGet(e){var t=new XMLHttpRequest; | |
return t.open("GET",e,!1),t.send(null),t.responseText | |
} | |
callKontakScripts(); |
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
mutation { | |
createAppointment( | |
businessId: "an id goes here" | |
input: { | |
clientId: "an id goes here" | |
patientId: "an id goes here" | |
resources: [ | |
{ | |
employeeId: "an id goes here", | |
responsibilityId: "an id goes here" |
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
<!-- PLACE THIS SOMWHERE IN THE BODY --> | |
<div id="nsa-widget"></div> | |
<!-- PLACE THIS IN THE FOOTER PLUGIN--> | |
<script type="text/javascript"> | |
var script = document.createElement('script'); | |
script.onload = function() { | |
var widgetContainer = document.querySelector('#nsa-widget'); | |
var query = window.location.search.substring(1); | |
var params = {}; |
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 "./styles.css"; | |
/* | |
* FAKE AXIOS | |
*/ | |
const axios = { | |
get: async () => ({ | |
data: [ | |
{ |
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 axios from 'axios'; | |
const Exercise = props => ( | |
<tr> | |
<td>{props.exercise.username}</td> | |
<td>{props.exercise.description}</td> | |
<td>{props.exercise.duration}</td> | |
<td>{props.exercise.date.substring(0, 10)}</td> |
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
class Store { | |
static set(values){ | |
this.value = values | |
} | |
static extend(values){ | |
this.value = { | |
...this.value, | |
...values | |
} | |
} |
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
module.exports = (data = {}, promises)=>( | |
new Promise((resolve, reject)=>{ | |
const promiseKeys = Object.keys(promises) | |
Promise.all(promiseKeys).then((responses)=>{ | |
for(let [i, response] of responses.entries()){ | |
data[promiseKeys[i]]=response | |
} | |
resolve(data) | |
}).catch((error)=>{ | |
reject(error) |
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
let chain = {}; | |
promiseA().then((users)=>{ | |
chain.users = users | |
return PromiseB() | |
}).then((accounts)=>{ | |
chain.accounts = accounts | |
return PromiseC() | |
}).then((patients)=>{ | |
chain.patients = patients | |
// do stuff with chain |
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 currentOrganization = (state=null, {type, payload})=>{ | |
console.log("RUNNING CURRENT ORGANIZATION!") | |
switch(type){ | |
case 'SET_ORGANIZATION': |
NewerOlder