Compare commits
3
Commits
c41cecebd6
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b41736386a | ||
|
|
525e465f5d | ||
|
|
dd7df2b28e |
@@ -3,7 +3,10 @@ import JSONAPIAdapter from '@ember-data/adapter/json-api';
|
||||
export default class ApplicationAdapter extends JSONAPIAdapter {
|
||||
namespace = 'api';
|
||||
|
||||
buildURL(...args) {
|
||||
return `${super.buildURL(...args)}.json`;
|
||||
}
|
||||
buildURL(...args) {return `${super.buildURL(...args)}.json`;}
|
||||
|
||||
urlForUpdateRecord(id, modelName, snapshot) {
|
||||
return `api/${modelName}s`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<div class="kategorie">
|
||||
<label>
|
||||
<h3>Produkttitel</h3>
|
||||
<Input class="light" @value={{this.titel}}/>
|
||||
</label>
|
||||
<label>
|
||||
<h3>Kategorie</h3>
|
||||
<Input class="light" @value={{this.kategorie}}/>
|
||||
</label>
|
||||
<label>
|
||||
<h3>Menge</h3>
|
||||
<Input class="light" @value={{this.menge}}/>
|
||||
</label>
|
||||
<label>
|
||||
<h3>Einheit</h3>
|
||||
<Input class="light" @value={{this.einheit}}/>
|
||||
</label>
|
||||
<label>
|
||||
<h3>Bild</h3>
|
||||
<Input class="light" @value={{this.bild}}/>
|
||||
<button class="button" {{on "click" this.speichern}}>Produkt hinzufügen</button>
|
||||
</label>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { action } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default class HinzufuegenController extends Component {
|
||||
|
||||
@tracked titel;
|
||||
@tracked kategorie;
|
||||
@tracked menge;
|
||||
@tracked einheit;
|
||||
@tracked bild;
|
||||
@tracked id;
|
||||
@tracked isselected;
|
||||
|
||||
@service store;
|
||||
|
||||
@action speichern()
|
||||
{
|
||||
let produkt = this.store.createRecord('produkt', {
|
||||
type: 'produkt',
|
||||
id: this.titel.split(' ').join(''),
|
||||
//attributes: {
|
||||
titel: this.titel,
|
||||
kategorie: this.kategorie,
|
||||
menge: this.menge,
|
||||
einheit: this.einheit,
|
||||
bild: this.bild,
|
||||
isselected: false
|
||||
//}
|
||||
})
|
||||
|
||||
//produkt._promiseProxy = true;
|
||||
produkt.save();
|
||||
|
||||
this.store.findAll('produkt').then(function (suchergebnis) {
|
||||
suchergebnis.forEach(element => {
|
||||
if (element.titel != undefined) {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
this.titel = null;
|
||||
this.kategorie = null;
|
||||
this.menge = null;
|
||||
this.einheit = null;
|
||||
this.bild = null;
|
||||
this.id = null;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,7 @@
|
||||
<button type="button" class="produkt {{if @isSelected "selected"}}" {{on "click" (fn this.toggleSelection @titel)}}>
|
||||
<img src={{@bild}} alt="Ein Bild von {{@titel}}"/>
|
||||
<h3>{{@titel}}</h3>
|
||||
<button type="button" class="produkt {{if @produkt.isselected "selected"}}" {{on "click" (fn this.toggleSelection @produkt.titel)}}>
|
||||
<img src={{@produkt.bild}} alt="Ein Bild von {{@produkt.titel}}"/>
|
||||
<h3>{{@produkt.titel}}</h3>
|
||||
<ul class="details">
|
||||
<li class="detail"><h4>Menge:</h4> {{@menge}}{{@einheit}}</li>
|
||||
<li class="detail"><h4>Menge:</h4> {{@produkt.menge}}{{@produkt.einheit}}</li>
|
||||
</ul>
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<!--<li class="detail"><h4>this.ex:</h4> {{this.ex}}</li>
|
||||
<li class="detail"><h4>this.prodn:</h4> {{this.prodn}}</li>
|
||||
<li class="detail"><h4>produkt count:</h4> {{this.count}}</li>-->
|
||||
</button>
|
||||
+16
-12
@@ -2,10 +2,11 @@ import Component from '@glimmer/component';
|
||||
import { action } from '@ember/object';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { inject as service } from '@ember/service';
|
||||
import ApplicationAdapter from '../adapters/application';
|
||||
|
||||
export default class ProduktController extends Component {
|
||||
@tracked isLarge = false;
|
||||
@tracked isSelected;
|
||||
@tracked isselected;
|
||||
|
||||
@service store;
|
||||
|
||||
@@ -16,8 +17,8 @@ export default class ProduktController extends Component {
|
||||
|
||||
@action toggleSelection(produktname)
|
||||
{
|
||||
this.isSelected = !this.isSelected;
|
||||
this.setStatus(produktname, this.isSelected);
|
||||
this.isselected = !this.isselected;
|
||||
this.setStatus(produktname, this.isselected);
|
||||
}
|
||||
|
||||
@action getStatus(produktname)
|
||||
@@ -29,19 +30,22 @@ export default class ProduktController extends Component {
|
||||
suchergebnis.forEach(element => {
|
||||
if(element.titel==produktname)
|
||||
{
|
||||
this.isSelected = element.isSelected;
|
||||
this.isselected = element.isselected;
|
||||
}
|
||||
});
|
||||
|
||||
if(!this.exists)
|
||||
{
|
||||
this.isSelected = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setStatus(produktname, selection)
|
||||
{
|
||||
function failure(reason) {
|
||||
// handle the error
|
||||
if(reason != null)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
//schreibt den aktuellen Zustand in den Store
|
||||
this.store.findAll('produkt')
|
||||
.then(function(suchergebnis)
|
||||
@@ -49,9 +53,9 @@ export default class ProduktController extends Component {
|
||||
suchergebnis.forEach(element => {
|
||||
if(element.titel==produktname)
|
||||
{
|
||||
element.isSelected = selection;
|
||||
element.save();
|
||||
this.store.updateRelationships();
|
||||
element.isselected = selection;
|
||||
element._promiseProxy = true;
|
||||
element.save().catch(failure);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,30 +1,12 @@
|
||||
{{#if @isSelected}}
|
||||
<button type="button" class="rezept selected" {{on "click" (fn this.toggleSelection @titel)}}>
|
||||
<span><img src={{@bild}} alt="Ein Bild von {{@titel}}"/></span>
|
||||
<button type="button" class="rezept {{if @rezept.isselected "selected"}}" {{on "click" (fn this.toggleSelection @rezept.titel)}}>
|
||||
<span><img src={{@rezept.bild}} alt="Ein Bild von {{@rezept.titel}}"/></span>
|
||||
<span>
|
||||
<h3>{{@titel}}</h3>
|
||||
<h3>{{@rezept.titel}}</h3>
|
||||
<ul class="details">
|
||||
<li class="detail"><h4>Zutaten:</h4>{{#each @produkte as |produkt|}}
|
||||
{{produkt.attributes.titel}},
|
||||
{{/each}}Gewürze</li>
|
||||
<li class="detail"><h4>Personen:</h4>{{@personen}}</li>
|
||||
<li class="detail"><h4>Dauer:</h4>{{@dauer}} Minuten</li>
|
||||
</ul>
|
||||
</span>
|
||||
<li class="detail"><h4>Zutaten:</h4>{{#each @rezept.produkte as |produkt|}}
|
||||
{{produkt.attributes.titel}}, {{/each}}Gewürze</li>
|
||||
<li class="detail"><h4>Personen:</h4>{{@rezept.personen}}</li>
|
||||
<li class="detail"><h4>Dauer:</h4>{{@rezept.dauer}} Minuten</li>
|
||||
</ul>
|
||||
</span>
|
||||
</button>
|
||||
{{else}}
|
||||
<button type="button" class="rezept" {{on "click" (fn this.toggleSelection @titel)}}>
|
||||
<span><img src={{@bild}} alt="Ein Bild von {{@titel}}"/></span>
|
||||
<span>
|
||||
<h3>{{@titel}}</h3>
|
||||
<ul class="details">
|
||||
<li class="detail"><h4>Zutaten:</h4>{{#each @produkte as |produkt|}}
|
||||
{{produkt.attributes.titel}},
|
||||
{{/each}}Gewürze</li>
|
||||
<li class="detail"><h4>Personen:</h4>{{@personen}} </li>
|
||||
<li class="detail"><h4>Dauer:</h4>{{@dauer}} Minuten</li>
|
||||
</ul>
|
||||
</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { inject as service } from '@ember/service';
|
||||
|
||||
export default class RezeptController extends Component {
|
||||
@tracked isLarge = false;
|
||||
@tracked isSelected;
|
||||
@tracked isselected;
|
||||
|
||||
@service store;
|
||||
|
||||
@@ -16,8 +16,8 @@ export default class RezeptController extends Component {
|
||||
|
||||
@action toggleSelection(rezeptname)
|
||||
{
|
||||
this.isSelected = !this.isSelected;
|
||||
this.setStatus(rezeptname, this.isSelected);
|
||||
this.isselected = !this.isselected;
|
||||
this.setStatus(rezeptname, this.isselected);
|
||||
}
|
||||
|
||||
setStatus(rezeptname, selection)
|
||||
@@ -29,8 +29,18 @@ export default class RezeptController extends Component {
|
||||
suchergebnis.forEach(element => {
|
||||
if(element.titel==rezeptname)
|
||||
{
|
||||
element.isSelected = selection;
|
||||
element.save();
|
||||
element.isselected = selection;
|
||||
element._promiseProxy = true;
|
||||
element.save().catch(failure);
|
||||
|
||||
function failure(reason)
|
||||
{
|
||||
// handle the error
|
||||
if(reason != null)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
+6
-11
@@ -1,15 +1,10 @@
|
||||
import Model, { attr } from '@ember-data/model';
|
||||
|
||||
export default class ProduktModel extends Model {
|
||||
@attr titel;
|
||||
@attr ('boolean') isSelected;
|
||||
@attr kategorie;
|
||||
@attr menge;
|
||||
@attr einheit;
|
||||
@attr bild;
|
||||
|
||||
get status()
|
||||
{
|
||||
return `${this.titel} ${this.IsSelected}`
|
||||
}
|
||||
@attr ('string') titel;
|
||||
@attr ('boolean') isselected;
|
||||
@attr ('string') kategorie;
|
||||
@attr ('number') menge;
|
||||
@attr ('string') einheit;
|
||||
@attr ('string') bild;
|
||||
}
|
||||
|
||||
+5
-10
@@ -1,19 +1,14 @@
|
||||
import Model, { attr, hasMany } from '@ember-data/model';
|
||||
|
||||
export default class RezeptModel extends Model {
|
||||
@attr titel;
|
||||
@attr ('boolean') isSelected;
|
||||
@attr ('string') titel;
|
||||
@attr ('boolean') isselected;
|
||||
@attr ('string') beschreibung;
|
||||
@attr kategorie;
|
||||
@attr ('string') kategorie;
|
||||
@attr produkte;
|
||||
@attr gewuerze;
|
||||
@attr ('number') personen;
|
||||
@attr ('number') dauer;
|
||||
@attr ('number') personen;
|
||||
@attr ('string') bild;
|
||||
|
||||
get status()
|
||||
{
|
||||
return `${this.titel} ${this.IsSelected}`
|
||||
}
|
||||
@attr gewuerze;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import Component from '@glimmer/component';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { action } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
const REZEPT_KATEGORIEN = [
|
||||
'Pasta',
|
||||
'Schwein',
|
||||
'Soße',
|
||||
'Fleisch',
|
||||
'Geflügel',
|
||||
'Rind',
|
||||
'Nachspeise',
|
||||
'Backen'
|
||||
];
|
||||
|
||||
export default class RezeptRoute extends Route{
|
||||
|
||||
@service store;
|
||||
|
||||
@@ -6,6 +6,9 @@ export default class ProduktRoute extends Route {
|
||||
@service store;
|
||||
|
||||
async model() {
|
||||
return this.store.findAll('produkt');
|
||||
let produkte = this.store.findAll('produkt');
|
||||
let rezepte = this.store.findAll('rezept');
|
||||
|
||||
return {produkte, rezepte};
|
||||
}
|
||||
}
|
||||
@@ -293,6 +293,7 @@ p {
|
||||
|
||||
.rezept img {
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.rezept .image {
|
||||
@@ -562,6 +563,7 @@ p {
|
||||
align-content: space-around;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.produkt h3 {
|
||||
@@ -686,6 +688,7 @@ p {
|
||||
/**align-items: center;*/
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.kategorie .details {
|
||||
|
||||
@@ -2,4 +2,10 @@
|
||||
<h2>neues Produkte</h2>
|
||||
<p>Hier kannst du ein neues Produkte hinzufügen!</p>
|
||||
<LinkTo @route="produkte" class="button">Produkte anzeigen</LinkTo>
|
||||
</Jumbo>
|
||||
</Jumbo>
|
||||
|
||||
<Kategorie @titel={{"neues Produkt"}}>
|
||||
<div class="resultsProdukt">
|
||||
<Hinzufuegen class="resultsProdukt" @typ={{'neues Produkt'}}/>
|
||||
</div>
|
||||
</Kategorie>
|
||||
@@ -9,7 +9,7 @@
|
||||
<ul class="resultsProdukt">
|
||||
{{#each @model as |produkt|}}
|
||||
{{#if (compare produkt.kategorie '===' 'Gemüse')}}
|
||||
<Produkt @titel={{produkt.titel}} @isSelected={{produkt.isSelected}} @menge={{produkt.menge}} @einheit={{produkt.einheit}} @bild={{produkt.bild}}/>
|
||||
<Produkt @produkt={{produkt}}/>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
@@ -21,7 +21,7 @@
|
||||
<ul class="resultsProdukt">
|
||||
{{#each @model as |produkt|}}
|
||||
{{#if (compare produkt.kategorie '===' 'Milchprodukte')}}
|
||||
<Produkt @titel={{produkt.titel}} @isSelected={{produkt.isSelected}} @menge={{produkt.menge}} @einheit={{produkt.einheit}} @bild={{produkt.bild}}/>
|
||||
<Produkt @produkt={{produkt}}/>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
@@ -33,7 +33,7 @@
|
||||
<ul class="resultsProdukt">
|
||||
{{#each @model as |produkt|}}
|
||||
{{#if (compare produkt.kategorie '===' 'Fleisch')}}
|
||||
<Produkt @titel={{produkt.titel}} @isSelected={{produkt.isSelected}} @menge={{produkt.menge}} @einheit={{produkt.einheit}} @bild={{produkt.bild}}/>
|
||||
<Produkt @produkt={{produkt}}/>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
@@ -45,7 +45,7 @@
|
||||
<ul class="resultsProdukt">
|
||||
{{#each @model as |produkt|}}
|
||||
{{#if (compare produkt.kategorie '===' 'Pasta')}}
|
||||
<Produkt @titel={{produkt.titel}} @isSelected={{produkt.isSelected}} @menge={{produkt.menge}} @einheit={{produkt.einheit}} @bild={{produkt.bild}}/>
|
||||
<Produkt @produkt={{produkt}}/>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ul class="resultsRezept">
|
||||
{{#each @model as |rezept|}}
|
||||
{{#if (compare rezept.kategorie '===' 'Pasta')}}
|
||||
<li><Rezept @titel={{rezept.titel}} @beschreibung={{rezept.beschreibung}} @kategorie={{rezept.kategorie}} @produkte={{rezept.produkte}} @gewuerze={{rezept.gewuerze}} @personen={{rezept.attributes.personen}} @dauer={{rezept.dauer}} @isSelected={{rezept.isSelected}}/></li>
|
||||
<li><Rezept @rezept={{rezept}}/></li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
@@ -6,10 +6,17 @@
|
||||
|
||||
<Kategorie @titel={{"mein Zettel"}}>
|
||||
<div class="rentals">
|
||||
<ul class="results">
|
||||
{{#each @model as |produkt|}}
|
||||
{{#if produkt.isSelected}}
|
||||
<Produkt @titel={{produkt.titel}} @isSelected={{produkt.isSelected}} @menge={{produkt.menge}} @einheit={{produkt.einheit}} @bild={{produkt.bild}}/>
|
||||
<ul class="resultsProdukt">
|
||||
{{#each @model.produkte as |produkt|}}
|
||||
{{#if produkt.isselected}}
|
||||
<Produkt @produkt={{produkt}}/>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#each @model.rezepte as |rezept|}}
|
||||
{{#if rezept.isselected}}
|
||||
{{#each rezept.produkte as |produkt|}}
|
||||
<Produkt @produkt={{produkt.attributes}}/>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
+6
-1
@@ -1,6 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"allowJs": true
|
||||
"allowJs": true,
|
||||
"strictBindCallApply": true,
|
||||
"strict": false,
|
||||
"alwaysStrict": false,
|
||||
"resolveJsonModule": true,
|
||||
"strictFunctionTypes": false
|
||||
}
|
||||
}
|
||||
+51
-52
@@ -1,53 +1,52 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"type": "produkt",
|
||||
"id": "spaghetti",
|
||||
"attributes": {
|
||||
"titel": "Spaghetti",
|
||||
"kategorie": "Pasta",
|
||||
"menge": 500,
|
||||
"einheit": "Gramm",
|
||||
"bild": "https://www.pastaweb.de/wp-content/uploads/2016/02/spaghetti.jpg",
|
||||
"is-selected": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "produkt",
|
||||
"id": "salat",
|
||||
"attributes": {
|
||||
"titel": "Salat",
|
||||
"kategorie": "Gemüse",
|
||||
"menge": 1,
|
||||
"einheit": "Kopf",
|
||||
"bild": "https://napolipizza-spiez.ch/WebRoot/Store2/Shops/178389/5BD1/5BA4/85F2/ACB6/97E9/D91A/30FA/F35F/gruener-salat-2464087.jpg",
|
||||
"is-selected": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "produkt",
|
||||
"id": "milch",
|
||||
"attributes": {
|
||||
"titel": "Milch",
|
||||
"kategorie": "Milchprodukte",
|
||||
"menge": 1,
|
||||
"einheit": "Liter",
|
||||
"bild": "https://lebensmittel-warenkunde.de/assets/images/milch-milchprodukte.jpg",
|
||||
"is-selected": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "produkt",
|
||||
"id": "kaese",
|
||||
"attributes": {
|
||||
"titel": "Käse",
|
||||
"kategorie": "Milchprodukte",
|
||||
"menge": 200,
|
||||
"einheit": "Gramm",
|
||||
"bild": "https://www.der-bank-blog.de/wp-content/uploads/2016/04/banking-schweizer-kaese.jpg",
|
||||
"is-selected": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
"data": [
|
||||
{
|
||||
"type": "produkt",
|
||||
"id": "spaghetti",
|
||||
"attributes": {
|
||||
"titel": "Spaghetti",
|
||||
"kategorie": "Pasta",
|
||||
"menge": 500,
|
||||
"einheit": "Gramm",
|
||||
"bild": "https://www.pastaweb.de/wp-content/uploads/2016/02/spaghetti.jpg",
|
||||
"isselected": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "produkt",
|
||||
"id": "salat",
|
||||
"attributes": {
|
||||
"titel": "Salat",
|
||||
"kategorie": "Gemüse",
|
||||
"menge": 1,
|
||||
"einheit": "Kopf",
|
||||
"bild": "https://napolipizza-spiez.ch/WebRoot/Store2/Shops/178389/5BD1/5BA4/85F2/ACB6/97E9/D91A/30FA/F35F/gruener-salat-2464087.jpg",
|
||||
"isselected": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "produkt",
|
||||
"id": "milch",
|
||||
"attributes": {
|
||||
"titel": "Milch",
|
||||
"kategorie": "Milchprodukte",
|
||||
"menge": 1,
|
||||
"einheit": "Liter",
|
||||
"bild": "https://lebensmittel-warenkunde.de/assets/images/milch-milchprodukte.jpg",
|
||||
"isselected": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "produkt",
|
||||
"id": "kaese",
|
||||
"attributes": {
|
||||
"titel": "Käse",
|
||||
"kategorie": "Milchprodukte",
|
||||
"menge": 200,
|
||||
"einheit": "Gramm",
|
||||
"bild": "https://www.der-bank-blog.de/wp-content/uploads/2016/04/banking-schweizer-kaese.jpg",
|
||||
"isselected": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+15
-13
@@ -7,9 +7,9 @@
|
||||
"titel": "Nudeln mit Garnelen und Zucchini",
|
||||
"kategorie": "Pasta",
|
||||
"personen": 4,
|
||||
"dauer": 20,
|
||||
"bild": "https://www.pastaweb.de/wp-content/uploads/2016/02/spaghetti.jpg",
|
||||
"is-selected": false,
|
||||
"dauer": 60,
|
||||
"bild": "https://kochkarussell.com/wp-content/uploads/2018/04/Nudeln-mit-Garnelen-und-Tomaten-Sahnesauce-3-500x500.jpg",
|
||||
"isselected": false,
|
||||
"beschreibung": "(1) Die Garnelen kalt überbrausen, in wenig Salzwasser kurz aufkochen, abgießen, das Wasser aufbewahren. (2) In einer Pfanne in der heißen Butter die Lauchzwiebeln und den Knoblauch anschwitzen, die Zucchiniwürfel und evtl. die Chilischoten zugeben, mit Salz und Pfeffer abwürzen. Zugedeckt 5 Minuten dünsten. Die Garnelen mit etwas Garnelenwasser unterischen, noch einmal erhitzen. Über die angerichteten Nudeln geben.",
|
||||
"produkte": [
|
||||
{
|
||||
@@ -72,7 +72,7 @@
|
||||
"einheit": "Stück"
|
||||
}
|
||||
}
|
||||
]},
|
||||
],
|
||||
"gewuerze":[
|
||||
{
|
||||
"type": "gewuerz",
|
||||
@@ -87,17 +87,18 @@
|
||||
"titel": "Chilischote"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "rezept",
|
||||
"id": "lasagne",
|
||||
"attributes": {
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "rezept",
|
||||
"id": "lasagne",
|
||||
"attributes": {
|
||||
"titel": "Lasagne Bolognese",
|
||||
"kategorie": "Pasta",
|
||||
"personen": 4,
|
||||
"dauer": 80,
|
||||
"bild": "https://www.pastaweb.de/wp-content/uploads/2016/02/spaghetti.jpg",
|
||||
"is-selected": false,
|
||||
"bild": "https://images.lecker.de/,id=2e0930f7,b=lecker,w=610,cg=c.jpg",
|
||||
"isselected": false,
|
||||
"beschreibung": "(1) Die Bologneser Sauce und die Bechamelsauce zubereiten. (2) Den Boden einer Auflaufform mit etwas Bechamelsauce bedecken, mit Lasagneblättern auslegen. Einige Löffel Bologneser Sauce darüfergeben, darauf einige Löffel Bechamelsauceverstreichen und mit Parmesan bestreuen. Diesen Vorgang wiederholen, bis alle Zutaten aufgebraucht sind. Die letzte Schicht sind Lasagneblätter, Bechamelsauce und Parmesan. (3) Die Form auf dem Rost in den kalten Backofen schieben und etwa 40 Minuten bei 220°C goldgelb backen. ",
|
||||
"produkte": [
|
||||
{
|
||||
@@ -140,7 +141,7 @@
|
||||
"einheit": "EL"
|
||||
}
|
||||
}
|
||||
]},
|
||||
],
|
||||
"gewuerze":[
|
||||
{
|
||||
"type": "gewuerz",
|
||||
@@ -152,5 +153,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | hinzufuegen', function(hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
|
||||
await render(hbs`<Hinzufuegen />`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
await render(hbs`
|
||||
<Hinzufuegen>
|
||||
template block text
|
||||
</Hinzufuegen>
|
||||
`);
|
||||
|
||||
assert.equal(this.element.textContent.trim(), 'template block text');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user