Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,6 +44,7 @@
"globals": {
"Polymer": false,
"MealOrderApp": true,
"MealOrderAdminApp": true,
"assert": false,
"test": false,
"suite": false,
Expand Down
21 changes: 21 additions & 0 deletions client/admin/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
# \<MealOrder-element\>



## Install the Polymer-CLI

First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your element locally.

## Viewing Your Element

```
$ polymer serve
```

## Running Tests

```
$ polymer test
```

Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.
21 changes: 21 additions & 0 deletions client/admin/bower.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
{
"name": "MealOrder-Admin",
"description": "",
"main": "index.html",
"dependencies": {
"polymer": "Polymer/polymer#^2.0.0",
"polymer-redux": "^1.0.5",
"app-layout": "PolymerElements/app-layout#^2.1.0",
"app-route": "PolymerElements/app-route#^2.0.0",
"iron-pages": "PolymerElements/iron-pages#^2.1.1",
"iron-icons": "PolymerElements/iron-icons#^2.1.1",
"paper-styles": "PolymerElements/paper-styles#^2.1.0"
},
"devDependencies": {
"web-component-tester": "Polymer/web-component-tester#^6.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
},
"resolutions": {
"polymer": "^2.0.0"
}
}
Binary file addedclient/admin/images/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions client/admin/index.html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
<!doctype html>
<!--
~ Copyright 2018, TeamDev Ltd. All rights reserved.
~
~ Redistribution and use in source and/or binary forms, with or without
~ modification, must retain the above copyright notice and the following
~ disclaimer.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
~ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
~ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
~ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
~ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
~ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
~ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
~ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
~ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
~ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
~ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<script src="./bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<script src="./node_modules/redux/dist/redux.js"></script>
<link rel="icon" href="./images/favicon-16x16.png" type="image/png">
<link rel="import" href="./src/mealorder/shell/app-shell.html">
<title>MealOrder</title>
<style>
body {
font-family: 'Roboto', 'Noto', sans-serif;
}
</style>
</head>
<body>
<app-shell></app-shell>
</body>
</html>
47 changes: 47 additions & 0 deletions client/admin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions client/admin/package.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"name": "MealOrder-Admin",
"version": "1.0.0",
"description": "Admin application for meal order",
"scripts": {
"test": "polymer test",
"postinstall": "bower install"
},
"dependencies": {
"redux": "^3.6.0"
}
}
7 changes: 7 additions & 0 deletions client/admin/polymer.json
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
{
"lint": {
"rules": [
"polymer-2"
]
}
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
<!--
~ Copyright 2018, TeamDev Ltd. All rights reserved.
~
~ Redistribution and use in source and/or binary forms, with or without
~ modification, must retain the above copyright notice and the following
~ disclaimer.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
~ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
~ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
~ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
~ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
~ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
~ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
~ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
~ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
~ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
~ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<link rel="import" href="../../../bower_components/polymer/polymer-element.html">
<link rel="import" href="../shell/redux-store.html">

<dom-module id="meal-order-dialog-container">
<template>
</template>
<script>
{
/**
* Dialog container.
*
* @customElement
* @polymer
* @appliesMixin MealOrderApp.ReduxMixin
*/
class MealOrderDialogContainer extends MealOrderAdminApp.ReduxMixin(Polymer.Element) {
static get is() {
return 'meal-order-dialog-container';
}

static get properties() {
return {
/**
* Current dialog.
*/
dialog: {
type: Object,
statePath: 'currentDialog'
}
}
}

static get observers() {
return [
'_dialogChanged(dialog)'
];
}

_dialogChanged() {
if (this.dialog && this.dialog.tagName) {
const element = document.createElement(this.dialog.tagName);
element.inputData = this.dialog.inputData || {};
element.mode = this.dialog.mode;
const manager = this.shadowRoot.appendChild(element);
const dialog = manager.shadowRoot.querySelector('#dialog');
dialog.open();
}
}
}

window.customElements.define(MealOrderDialogContainer.is, MealOrderDialogContainer);
}
</script>
</dom-module>
Loading