| import { ViewBase } from '../../libappbase/viewbase'; | 
| import { ButtonFinancesContextMenuItem } from '../actionbarpages/abp.data'; | 
| import { AppMP } from '../appmp'; | 
| import { FormStockingAccount } from '../forms/form.stockingaccount'; | 
| import { FormStockingCost } from '../forms/form.stockingcost'; | 
|   | 
| /** | 
|  * Data > Finances > Stocking cost view. | 
|  */ | 
| export class ViewStockingCost extends ViewBase { | 
|   public readonly name = 'Stocking Costs'; | 
|   public readonly viewPath = 'Data > Finances > Stocking Costs'; | 
|   | 
|   public frmStockingAccount = new FormStockingAccount(); | 
|   public frmStockingCost = new FormStockingCost(); | 
|   | 
|   /** | 
|    * Switch to stocking 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(); | 
|     // Select Stocking Cost from the dropdown | 
|     await appMP.abpData.btnFinances.clickDropdownAndSelectMenu(ButtonFinancesContextMenuItem.StockingPointCosts); | 
|     // Wait until form stocking account exist | 
|     await this.frmStockingAccount.waitUntilPresent(); | 
|     await this.frmStockingCost.waitUntilPresent(); | 
|   } | 
| } |