public static async Task CreateProjectAsync(string portfolio, ProjectUpdateModel project) { var dto = await TestBackendAPIClient.GetAsync <GetProjectDTO <ProjectEditViewModel> >($"api/Projects/{portfolio}/newproject"); project.project_id = dto.Project.project_id; await TestBackendAPIClient.PostAsync <ProjectUpdateModel>("api/Projects", project); }
public static async Task <IEnumerable <SelectItemModel> > GetProjectByNameOrIdAsync(string nameOrId) { var queryParams = new Dictionary <string, string>() { { "term", nameOrId } }; return(await TestBackendAPIClient.GetAsync <IEnumerable <SelectItemModel> >("api/Projects/search", queryParams)); }
internal static async Task <GetProjectQueryDTO> GetFilterOptionsAsync(string portfolio) { return(await TestBackendAPIClient.GetAsync <GetProjectQueryDTO>($"api/Portfolios/{portfolio}/filteroptions")); }
internal static async Task <PortfolioConfigModel> GetPortfolioConfigurationAsync(string portfolio) { return(await TestBackendAPIClient.GetAsync <PortfolioConfigModel>($"api/PortfolioConfiguration?portfolio={portfolio}")); }
internal static async Task <GetProjectDTO <ProjectEditViewModel> > GetProjectAsync(string projectId) { return(await TestBackendAPIClient.GetAsync <GetProjectDTO <ProjectEditViewModel> >($"api/Projects/{projectId}/edit")); }
internal static async Task <ArchiveResponse> ArchiveProjectsAsync(string portfolio) { return(await TestBackendAPIClient.GetAsync <ArchiveResponse>($"api/Portfolios/{portfolio}/archive")); }