import { ViewBase } from '../../libappbase/viewbase';
|
import { UIWaitSOP } from '../../libappsop/objectsop';
|
import { AppMP } from '../appmp';
|
import { FormAccount } from '../forms/form.account';
|
|
/**
|
* Scenarios > Accounts view.
|
*/
|
export class ViewAccount extends ViewBase implements UIWaitSOP {
|
public readonly name = 'Accounts (template)';
|
public readonly viewPath = 'Scenarios > Accounts';
|
|
public frmAccount = new FormAccount();
|
|
/**
|
* Switch to account view
|
*/
|
public async switchTo(): Promise<void> {
|
const appMP = AppMP.getInstance();
|
|
// wait until abp scenario is visible
|
await appMP.abpScenario.isVisible();
|
// Open scenario action bar page
|
await appMP.abpScenario.click();
|
// Click account button on the abp
|
await appMP.abpScenario.btnAccounts.click();
|
|
await this.waitUILoaded();
|
}
|
|
public async waitUILoaded(): Promise<void> {
|
// Wait until form stocking account exist
|
await this.frmAccount.waitUntilPresent();
|
}
|
}
|
|
export enum AccountCostType {
|
General = 'General fixed costs',
|
Maintenance = 'Maintenance cost',
|
Labor = 'Labor cost',
|
Changeover = 'Changeover cost',
|
}
|