simple-item-modal.component.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <div class="dimensions">
  2. <div class="title">
  3. @if (!isUpdate) {
  4. {{ "inventory.modal.add" | translate }}
  5. } @else {
  6. {{ "inventory.modal.edit" | translate }}
  7. }
  8. </div>
  9. <div class="flex-form t-15">
  10. <div>
  11. <div class="input-label">{{ "inventory.name" | translate }}</div>
  12. <mat-form-field appearance="outline" style="width: 18.9rem">
  13. <input matInput [(ngModel)]="name" />
  14. </mat-form-field>
  15. </div>
  16. <div class="flex numbers">
  17. <div>
  18. <div class="input-label">{{ "inventory.weight" | translate }}</div>
  19. <mat-form-field appearance="outline" style="width: 7rem">
  20. <input type="number" class="right" matInput [(ngModel)]="weight" />
  21. <span class="input-value" matTextSuffix>Lb.</span>
  22. </mat-form-field>
  23. </div>
  24. <div>
  25. <div class="input-label">{{ "inventory.quantity" | translate }}</div>
  26. <mat-form-field appearance="outline" style="width: 7rem">
  27. <input type="number" class="right" matInput [(ngModel)]="quantity" />
  28. <span class="input-value" matTextSuffix>{{
  29. "inventory.modal.pieces" | translate
  30. }}</span>
  31. </mat-form-field>
  32. </div>
  33. @if (isFood) {
  34. <div>
  35. <div class="input-label">{{ "inventory.ready" | translate }}</div>
  36. <input
  37. type="checkbox"
  38. style="margin: 0.5rem 0 0 2.5rem"
  39. [(ngModel)]="isReady"
  40. />
  41. </div>
  42. } @else {
  43. <div>
  44. <div class="input-label">{{ "inventory.value" | translate }}</div>
  45. <mat-form-field appearance="outline" style="width: 7rem">
  46. <input type="number" class="right" matInput [(ngModel)]="value" />
  47. <span class="input-value" matTextSuffix>Gold</span>
  48. </mat-form-field>
  49. </div>
  50. }
  51. </div>
  52. </div>
  53. <div class="NgxEditor__Wrapper t-15">
  54. <ngx-editor-menu [editor]="editor" [toolbar]="toolbar"> </ngx-editor-menu>
  55. <ngx-editor
  56. [editor]="editor"
  57. [(ngModel)]="description"
  58. [placeholder]="'inventory.modal.placeholder' | translate"
  59. ></ngx-editor>
  60. </div>
  61. <div class="horizontal-buttons">
  62. @if (isUpdate) {
  63. <ui-button style="width: 40%" (click)="update()"
  64. >{{ "buttons.confirm" | translate }}
  65. </ui-button>
  66. } @else {
  67. <ui-button style="width: 40%" (click)="add()"
  68. >{{ "buttons.confirm" | translate }}
  69. </ui-button>
  70. }
  71. <ui-button style="width: 40%" (click)="cancel()"
  72. >{{ "buttons.cancel" | translate }}
  73. </ui-button>
  74. </div>
  75. </div>