| import { AppMP } from '../appmp'; | 
| import { ViewBase } from '../../libappbase/viewbase'; | 
| import { UIWaitSOP } from '../../libappsop/objectsop'; | 
| import { FormCampaign } from '../forms/form.campaign'; | 
| import { FormCampaignPlanning } from '../forms/form.campaignplanning'; | 
| import { FormCampaignTypesReadOnly } from '../forms/form.campaigntypesreadonly'; | 
|   | 
| export class ViewCampaigns extends ViewBase implements UIWaitSOP { | 
|   public readonly name = 'Campaign planning'; | 
|   public readonly viewPath = 'Plan > Campaigns'; | 
|   | 
|   public formCampaign = new FormCampaign(); | 
|   public formCampaignType = new FormCampaignTypesReadOnly(); | 
|   public formCampaignPlanning = new FormCampaignPlanning(); | 
|   | 
|   public async switchTo(): Promise<void> { | 
|     const appMp = AppMP.getInstance(); | 
|     // Click Plan action bar page | 
|     await appMp.abpPlan.click(); | 
|     await appMp.abpPlan.btnCampaign.click(); | 
|     await this.waitUILoaded(); | 
|   } | 
|   | 
|   public async waitUILoaded(): Promise<void> { | 
|     await this.formCampaignType.waitUntilPresent(); | 
|     await this.formCampaign.waitUntilPresent(); | 
|     await this.formCampaignPlanning.waitUntilPresent(); | 
|   } | 
| } |