| import { ViewBase } from '../../libappbase/viewbase'; | 
| import { AppMP } from '../appmp'; | 
| import { FormOperations } from '../forms/form.operations'; | 
| import { FormOperationAccount } from '../forms/form.operationaccount'; | 
| import { FormOperationCost } from '../forms/form.operationcost'; | 
| import { ButtonFinancesContextMenuItem } from '../actionbarpages/abp.data'; | 
|   | 
| /** | 
|  * Data > Finances > Operation Costs view. | 
|  */ | 
| export class ViewOperationCost extends ViewBase { | 
|   public readonly name = 'Operation Costs'; | 
|   public readonly viewPath = 'Data > Finances > Operation Costs'; | 
|   | 
|   // Forms | 
|   public frmOperations = new FormOperations(); | 
|   public frmOperationsAccount = new FormOperationAccount(); | 
|   public frmOperationCost = new FormOperationCost(); | 
|   | 
|   /** | 
|    * Switch to opreation cost view | 
|    */ | 
|   public async switchTo(): Promise<void> { | 
|     const appMP = AppMP.getInstance(); | 
|   | 
|     // wait until abp data is visible | 
|     await appMP.abpData.isVisible(); | 
|     // Open Data action bar page | 
|     await appMP.abpData.click(); | 
|     // Click on the OperationCost button | 
|     await appMP.abpData.btnFinances.clickDropdownAndSelectMenu(ButtonFinancesContextMenuItem.OperationCosts); | 
|     // Wait until form operations, operation accounts and operation cost is present | 
|     await this.frmOperations.waitUntilPresent(); | 
|     await this.frmOperationsAccount.waitUntilPresent(); | 
|     await this.frmOperationCost.waitUntilPresent(); | 
|   } | 
| } |