34 lines
559 B
Markdown
34 lines
559 B
Markdown
# Aufgabe
|
|
|
|
- Nach Positionsveränderung (drop, move-up,move-down) sollen alle Positionen der Zeilen als Array festgehalten werden.
|
|
|
|
```js
|
|
|
|
const positions = [
|
|
{
|
|
_id: '6cbe4783-cfb5-4ed7-8196-9d6b55217de0',
|
|
position: 1,
|
|
},
|
|
{
|
|
_id: '6cbe4783-cfb5-4ed7-8196-9d6b55217de0',
|
|
position: 2,
|
|
},
|
|
{...}
|
|
]
|
|
|
|
```
|
|
|
|
- Positionsarray an Server zur Aktualisierung senden (PUT)
|
|
|
|
```js
|
|
'http://127.0.0.1:8000/api/products/positions';
|
|
```
|
|
|
|
- Server: Positionen abfangen und products Array aktualisieren
|
|
|
|
```js
|
|
//ProductModel
|
|
updatePosition() {...}
|
|
|
|
```
|