Broker System for Supercredit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
6.1KB

  1. <ng-container>
  2. <fieldset class="k-form-fieldset">
  3. <bkp-divider><kendo-icon [name]="'dollar'"> </kendo-icon>&nbsp;Reward from Loan </bkp-divider>
  4. <div style="text-align: center">
  5. <kendo-chip label="SuperCredit Loan ID {{Loan.Id}}" [removable]="false" > </kendo-chip>
  6. </div>
  7. <div class="vertical-spacer"></div>
  8. <kendo-grid [data]="pendingReward"
  9. [height]="410"
  10. (add)="addHandler($event)"
  11. (cancel)="cancelHandler($event)"
  12. (save)="saveHandler($event)"
  13. (edit)="editHandler($event)"
  14. (remove)="removeHandler($event)"
  15. >
  16. <ng-template kendoGridToolbarTemplate>
  17. <button kendoGridAddCommand icon="plus" [primary]="true" class="toolbarAddNew">Add new</button>
  18. </ng-template>
  19. <kendo-grid-command-column title="action" width="80">
  20. <ng-template kendoGridCellTemplate let-isNew="isNew" let-dataItem>
  21. <button kendoGridEditCommand *ngIf="!dataItem.Paid" icon="edit"></button>
  22. <button kendoGridRemoveCommand *ngIf="!dataItem.Paid" icon="delete"></button>
  23. <button kendoGridSaveCommand [disabled]="formGroup?.invalid" icon="save"></button>
  24. <button kendoGridCancelCommand icon="close"></button>
  25. </ng-template>
  26. </kendo-grid-command-column>
  27. <kendo-grid-column field="ToId" title="Name" width="200">
  28. <ng-template kendoGridCellTemplate let-dataItem>
  29. <div class="customer-photo" [ngStyle]="{'background-image' : photoURL(dataItem.ToId) }"></div>
  30. <div class="customer-name"> {{ UserName(dataItem) }}</div>
  31. </ng-template>
  32. <ng-template kendoGridEditTemplate let-fg="formGroup" let-column="column" let-dataItem="dataItem">
  33. <kendo-multicolumncombobox
  34. #selectRevelantPeople
  35. [data]="relevantPeople"
  36. [textField]="'Display'"
  37. [valueField]="'Id'"
  38. [valuePrimitive]="true"
  39. [listHeight]="300"
  40. placeholder="Type here to search"
  41. [suggest]="true"
  42. [clearButton]="true"
  43. [allowCustom]="false"
  44. [formControl]="formGroup.get(column.field)"
  45. (valueChange)="peopleChanged($event)"
  46. >
  47. <kendo-combobox-column
  48. [field]="'Display'"
  49. [title]="'Contact Name'"
  50. [width]="200"
  51. >
  52. <ng-template
  53. kendoMultiColumnComboBoxColumnCellTemplate
  54. let-dataItem
  55. >
  56. <img
  57. class="contact-image"
  58. [src]="getContactImageUrl(dataItem.Id)"
  59. />
  60. <span>{{ dataItem.Display }}</span>
  61. </ng-template>
  62. </kendo-combobox-column>
  63. <kendo-combobox-column
  64. [field]="'Role'"
  65. [title]="'Role of Loan'"
  66. [width]="200"
  67. >
  68. </kendo-combobox-column>
  69. <ng-template kendoMultiColumnComboBoxFooterTemplate>
  70. <strong>
  71. {{ total }} records in total
  72. </strong>
  73. </ng-template>
  74. </kendo-multicolumncombobox>
  75. </ng-template>
  76. </kendo-grid-column>
  77. <kendo-grid-column field="Role" title="Role" width="100" [editable]="true">
  78. </kendo-grid-column>
  79. <kendo-grid-column field="Amount" title="Amount" width="100" editor="numeric" format="{0:c}"></kendo-grid-column>
  80. <kendo-grid-column field="Description" title="Description" width="200">
  81. <ng-template
  82. kendoGridEditTemplate let-fg="formGroup" let-column="column" let-dataItem="dataItem">
  83. <kendo-combobox
  84. name="existingPayDescription"
  85. [data]="existingPayDescription"
  86. [valuePrimitive]="true"
  87. [allowCustom]="true"
  88. [formControl]="formGroup.get(column.field)"
  89. >
  90. </kendo-combobox>
  91. </ng-template>
  92. </kendo-grid-column>
  93. <kendo-grid-column field="Ts" title="Date" width="100" editor="date" >
  94. <ng-template kendoGridCellTemplate let-dataItem>
  95. {{dataItem.Ts | date: 'yyyy-MM-dd'}}
  96. </ng-template>
  97. </kendo-grid-column>
  98. </kendo-grid>
  99. <bkp-divider-shadow-bottom></bkp-divider-shadow-bottom>
  100. <div class="vertical-spacer"></div>
  101. Paid Reward (casted into stone, cannot be undone )
  102. <kendo-grid [data]="paidReward"
  103. [height]="410"
  104. (add)="addHandler($event)"
  105. (cancel)="cancelHandler($event)"
  106. (save)="saveHandler($event)"
  107. (edit)="editHandler($event)"
  108. (remove)="removeHandler($event)"
  109. >
  110. <kendo-grid-column field="Id" title="Id" width="80"> </kendo-grid-column>
  111. <kendo-grid-column field="To" title="Name" width="300">
  112. <ng-template kendoGridCellTemplate let-dataItem>
  113. <div class="customer-photo" [ngStyle]="{'background-image' : photoURL(dataItem.To) }"></div>
  114. <div class="customer-name"> {{ UserName(dataItem) }}</div>
  115. </ng-template>
  116. </kendo-grid-column>
  117. <kendo-grid-column field="Role" title="Role" width="200">
  118. </kendo-grid-column>
  119. <kendo-grid-column field="Amount" title="Amount" width="200" format="{0:c}"></kendo-grid-column>
  120. <kendo-grid-column field="Description" title="Description" width="200">
  121. </kendo-grid-column>
  122. <kendo-grid-column field="Ts" title="Date" width="200">
  123. <ng-template kendoGridCellTemplate let-dataItem>
  124. {{dataItem.Ts | date: 'yyyy-MM-dd'}}
  125. </ng-template>
  126. </kendo-grid-column>
  127. <kendo-grid-column field="PayOutId" title="Payment Info" width="180"> </kendo-grid-column>
  128. </kendo-grid>
  129. <bkp-divider-shadow-bottom></bkp-divider-shadow-bottom>
  130. <div class="vertical-spacer"></div>
  131. </fieldset>
  132. </ng-container>
  133. <div class="k-form-buttons k-buttons-end">
  134. <div>
  135. <button class="k-button k-primary" (click)="prev()" > ◀ Prev</button>
  136. <button kendoButton look="flat" [disabled]="true">&nbsp;</button>
  137. <button kendoButton class="k-button k-primary" (click)="next()" icon="save"> (Save and) Next ▶ </button>
  138. </div>
  139. </div>