Skip to content

Instantly share code, notes, and snippets.

<mat-accordion>
<mat-expansion-panel *ngFor="let category of bot.categories" #expansionPanel (opened)="onPanelOpen(category)">
<mat-expansion-panel-header>
<mat-panel-title>
{{ category.name }}
</mat-panel-title>
<mat-panel-description class="justify-end" *ngIf="expansionPanel.expanded && !isPristine(category)">
<button mat-raised-button color="primary" type="submit" (click)="$event.stopPropagation();saveCategory(category)">
Save Changes
</button>
import mongoose from 'mongoose';
export interface CategoryAI {
utterances: Utterance[];
entities: string[];
}
export interface CategoryFilter {
entityName: string;
operatorOnValue: string;
{ settings:
[Node] { openingMessage:
[Node] { messageType: 'Opening',
[Node] options: [Array],
[Node] message: 'Welcome to CupoTestStore, I\'m Cupo your personal shopkeeper. What type of products are you interested in?' },
[Node] languageCode: 'en',
[Node] platform: 'shopify',
[Node] currency: 'ILS' },
[Node] appearance:
[Node] { colors: { fabBG: '#2196f3', chatTop: '#2196f3', chatControls: '#2196f3' },
import { Injectable } from '@angular/core';
import {
HttpEvent, HttpInterceptor, HttpHandler, HttpRequest,
HttpErrorResponse
} from '@angular/common/http';
import { Observable, throwError, empty, of } from 'rxjs';
import { catchError, retryWhen, flatMap, take, concat, switchMap } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import * as fromRoot from '../../store';
import { environmentRule } from '@app/utils/environment';
export const enum Instruction {
UPDATE
}
instruct(action: Instruction, payload: Partial<S>) {
switch (action) {
case Instruction.UPDATE:
this.update(payload);
break;
default:
import { Component, OnInit } from '@angular/core';
import { Validators, FormBuilder } from "@angular/forms";
import { LocationService } from "../location.service";
import { Location } from "../location"
import { ActivatedRoute, ParamMap } from "@angular/router";
import { filter, map, switchMap, take } from "rxjs/operators";
import { Observable } from "rxjs";
{
"compileOnSave": false,
"include": [
"src/**/*.ts"
],
"compilerOptions": {
"baseUrl": "./",
"importHelpers": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
@DanielNetzer
DanielNetzer / firebase.js
Created February 27, 2019 09:17
nuxtjs firebase plugin
import firebase from 'firebase/app'
import 'firebase/firestore'
import 'firebase/auth'
import 'firebase/storage'
export default ({ app }, inject) => {
const env = process.browser ? app.store.state.env : process.env
// init firebase
if (!firebase.apps.length && env.API_KEY && env.PROJECT_ID && env.SENDER_ID) {
const config = {
version: 0.1
test:
phases:
preTest:
commands:
- npm install
- npm install wait-on
- npm install mocha@5.2.0 mochawesome mochawesome-merge mochawesome-report-generator
- 'npm start & npx wait-on http://localhost:3869'
test:
module.exports = {
types: [
{ value: 'feat', name: '✨ - FEATURE: a new feature' },
{ value: 'fix', name: '🐞 - FIX: a bug fix' },
{
value: 'chore',
name: '🔧 - CHORE: changes to the build process or auxiliary tools and libraries such as documentation generation'
},
{ value: 'docs', name: '📝 - DOCS: documentation only changes' },
{