import './productPageAdmin.scss';
import template from './productPageAdmin.html';
+import {react2angular} from 'react2angular';
+import ProductManager from 'components/pages/admin/productManager';
const productPageAdmin = angular.module('productPageAdmin', [grid, resources, editProduct]);
+
+productPageAdmin.component('productManager', react2angular(ProductManager));
+
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
{ | |
"bbox": { | |
"topLeft": { | |
"lat": "35.28944337263661", | |
"lon": "-104.44739421164043" | |
}, | |
"bottomRight": { | |
"lat": "26.858621162123413", | |
"lon": "-93.09427205358374" | |
} |
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
package models.responses | |
import spray.json.DefaultJsonProtocol | |
import models.common._ | |
// User.scala | |
case class User(id: Int, name: String, location: Location) extends GeoSearchable | |
object User extends DefaultJsonProtocol { | |
implicit val format = jsonFormat3(User.apply) | |
} |
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
version: "2.2" | |
services: | |
es01: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2 | |
container_name: es01 | |
environment: | |
- discovery.type=single-node | |
- "ES_JAVA_OPTS=-Xms2g -Xmx2g" | |
ulimits: | |
memlock: |
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
query ($bbox: BBox) { # We tell GQL the type of the $bbox variable | |
geoSearch(bbox: $bbox) { | |
users { | |
hits { | |
id | |
name | |
} | |
} | |
coffeeShops { | |
hits { |
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
object Main extends App { | |
val PORT = 8080 | |
implicit val actorSystem = ActorSystem("graphql-server") | |
implicit val materializer = ActorMaterializer() | |
import actorSystem.dispatcher | |
scala.sys.addShutdownHook(() -> shutdown()) | |
val route: Route = |
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
name := "gql-elastic" | |
version := "0.1" | |
scalaVersion := "2.13.0" | |
val elastic4sVersion = "7.1.0" | |
libraryDependencies ++= Seq( | |
"org.sangria-graphql" %% "sangria" % "2.0.0-M1", | |
"org.sangria-graphql" %% "sangria-spray-json" % "1.0.2", | |
"com.typesafe.akka" %% "akka-http" % "10.1.10", | |
"com.typesafe.akka" %% "akka-http-spray-json" % "10.1.10", |
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
import { Bucket, State, Action } from './interfaces'; | |
const replaceBucket = (state: State, index: number, replacer: Function) => { | |
const stateCopy = { ...state }; | |
stateCopy.buckets[index] = replacer(stateCopy.buckets[index]); | |
return stateCopy; | |
}; | |
export default function reducer(state: State, action: Action): State { | |
switch (action.type) { |
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
export interface Bucket { | |
notes: string; | |
id?: string; | |
} | |
export interface UpdateNotesPayload { | |
targetIndex: number; | |
value: string; | |
} |
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
import React, {Suspense} from 'react'; | |
import {BrowserRouter as Router, Route} from 'react-router-dom'; | |
import ProductManagerIndex from './ProductManagerIndex'; | |
const ProductManagerCreate = React.lazy(() => import('./ProductManagerCreate')); | |
export default function ProductManager () { | |
return ( | |
<Suspense fallback={<div>Loading...</div>}> | |
<Router> |