import { ViewBase } from '../../libappbase/viewbase'; 
 | 
import { AppMP } from '../appmp'; 
 | 
import { FormUnitAccount } from '../forms/form.unitaccount'; 
 | 
import { FormUnitCost } from '../forms/form.unitcost'; 
 | 
import { ButtonFinancesContextMenuItem } from '../actionbarpages/abp.data'; 
 | 
  
 | 
/** 
 | 
 * Data > Finances > Unit Costs view. 
 | 
 */ 
 | 
export class ViewUnitCost extends ViewBase { 
 | 
  public readonly name = 'Unit Costs'; 
 | 
  public readonly viewPath = 'Data > Finances > Unit Costs'; 
 | 
  
 | 
  public frmUnitAccount = new FormUnitAccount(); 
 | 
  public frmUnitCost = new FormUnitCost(); 
 | 
  
 | 
  /** 
 | 
   * Switch to unit cost view 
 | 
   */ 
 | 
  public async switchTo(): Promise<void> { 
 | 
    const appMP = AppMP.getInstance(); 
 | 
  
 | 
    // wait until abp develop is visible 
 | 
    await appMP.abpData.isVisible(); 
 | 
    // Open Develop action bar page 
 | 
    await appMP.abpData.click(); 
 | 
    // Click on the Start Demo button 
 | 
    await appMP.abpData.btnFinances.clickDropdownAndSelectMenu(ButtonFinancesContextMenuItem.UnitCosts); 
 | 
    // Wait until form unit account and unit cost is present 
 | 
    await this.frmUnitAccount.waitUntilPresent(); 
 | 
    await this.frmUnitCost.waitUntilPresent(); 
 | 
  } 
 | 
} 
 |