|
@@ -1,10 +1,61 @@
|
|
import { Component } from '@angular/core';
|
|
import { Component } from '@angular/core';
|
|
|
|
+import {
|
|
|
|
+ CdkDragDrop,
|
|
|
|
+ CdkDropList,
|
|
|
|
+ CdkDrag,
|
|
|
|
+ moveItemInArray,
|
|
|
|
+} from '@angular/cdk/drag-drop';
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-journal-inventory',
|
|
selector: 'app-journal-inventory',
|
|
templateUrl: './journal-inventory.component.html',
|
|
templateUrl: './journal-inventory.component.html',
|
|
- styleUrls: ['./journal-inventory.component.scss']
|
|
|
|
|
|
+ styleUrls: ['./journal-inventory.component.scss'],
|
|
})
|
|
})
|
|
export class JournalInventoryComponent {
|
|
export class JournalInventoryComponent {
|
|
|
|
+ movies = [
|
|
|
|
+ 'Episode I - The Phantom Menace',
|
|
|
|
+ 'Episode II - Attack of the Clones',
|
|
|
|
+ 'Episode III - Revenge of the Sith',
|
|
|
|
+ 'Episode IV - A New Hope',
|
|
|
|
+ 'Episode V - The Empire Strikes Back',
|
|
|
|
+ 'Episode VI - Return of the Jedi',
|
|
|
|
+ 'Episode VII - The Force Awakens',
|
|
|
|
+ 'Episode VIII - The Last Jedi',
|
|
|
|
+ 'Episode IX – The Rise of Skywalker',
|
|
|
|
+ ];
|
|
|
|
|
|
|
|
+ public food = [
|
|
|
|
+ { name: 'Ration', ready: true, amount: 7 },
|
|
|
|
+ { name: 'Ration', ready: true, amount: 4 },
|
|
|
|
+ { name: 'Ration', ready: true, amount: 3 },
|
|
|
|
+ ];
|
|
|
|
+
|
|
|
|
+ public weaponsAndArmor = [
|
|
|
|
+ {
|
|
|
|
+ name: 'Kurzschwert',
|
|
|
|
+ weight: 40,
|
|
|
|
+ value: 50,
|
|
|
|
+ quantity: 1,
|
|
|
|
+ description: 'Hallo',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: 'Helebade',
|
|
|
|
+ weight: 40,
|
|
|
|
+ value: 50,
|
|
|
|
+ quantity: 1,
|
|
|
|
+ description: 'Hallo',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: 'Armbrust',
|
|
|
|
+ weight: 40,
|
|
|
|
+ value: 50,
|
|
|
|
+ quantity: 1,
|
|
|
|
+ description: 'Hallo',
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+
|
|
|
|
+ drop(event: CdkDragDrop<string[]>, list: any[]) {
|
|
|
|
+ moveItemInArray(list, event.previousIndex, event.currentIndex);
|
|
|
|
+ console.log(list);
|
|
|
|
+ }
|
|
}
|
|
}
|