SKE-40 display competitionCategories

This commit is contained in:
Przemysław Stawujak 2018-12-05 00:56:38 +01:00
parent 4bb63859d2
commit c119ef9964
8 changed files with 350 additions and 158 deletions

View File

@ -7,6 +7,7 @@ import { AboutComponent } from './about/about.component';
import { UsersComponent } from './users/users.component';
import { TenantsComponent } from './tenants/tenants.component';
import { RolesComponent } from 'app/roles/roles.component';
import { CategoriesListComponent } from '@app/categories-list/categories-list.component';
@NgModule({
imports: [
@ -19,7 +20,8 @@ import { RolesComponent } from 'app/roles/roles.component';
{ path: 'users', component: UsersComponent, data: { permission: 'Pages.Users' }, canActivate: [AppRouteGuard] },
{ path: 'roles', component: RolesComponent, data: { permission: 'Pages.Roles' }, canActivate: [AppRouteGuard] },
{ path: 'tenants', component: TenantsComponent, data: { permission: 'Pages.Tenants' }, canActivate: [AppRouteGuard] },
{ path: 'about', component: AboutComponent }
{ path: 'about', component: AboutComponent },
{ path: 'categories-list', component: CategoriesListComponent, canActivate: [AppRouteGuard] },
]
}
])

View File

@ -32,6 +32,7 @@ import { SideBarUserAreaComponent } from '@app/layout/sidebar-user-area.componen
import { SideBarNavComponent } from '@app/layout/sidebar-nav.component';
import { SideBarFooterComponent } from '@app/layout/sidebar-footer.component';
import { RightSideBarComponent } from '@app/layout/right-sidebar.component';
import { CategoriesListComponent } from '@app/categories-list/categories-list.component';
@NgModule({
declarations: [
@ -52,7 +53,8 @@ import { RightSideBarComponent } from '@app/layout/right-sidebar.component';
SideBarUserAreaComponent,
SideBarNavComponent,
SideBarFooterComponent,
RightSideBarComponent
RightSideBarComponent,
CategoriesListComponent
],
imports: [

View File

@ -0,0 +1,21 @@
.flex-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
.flex-item {
background-color: deepskyblue;
width: 200px;
margin: 10px;
text-align: center;
line-height: 90px;
font-size: 25px;
border-radius: 25px;
border: 1px solid gray;
color: darkolivegreen;
text-shadow: 2px 2px 6px ghostwhite;
font-weight: bold;
}

View File

@ -0,0 +1,5 @@
<div class="flex-container">
<div class="flex-item" *ngFor="let category of competitionCategoriesList">
{{ category.name }}
</div>
</div>

View File

@ -0,0 +1,31 @@
import { Component, OnInit, Injector } from '@angular/core';
import { appModuleAnimation } from '@shared/animations/routerTransition';
import { CompetitionCategoryServiceProxy, CompetitionCategoryDto } from '@shared/service-proxies/service-proxies';
import { List } from 'lodash';
@Component({
templateUrl: './categories-list.component.html',
styleUrls: ['./categories-list.component.css'],
animations: [appModuleAnimation()]
})
export class CategoriesListComponent implements OnInit {
public competitionCategoriesList: List<CompetitionCategoryDto> = [];
constructor(
injector: Injector,
private _competitionCategoryService: CompetitionCategoryServiceProxy
) {
}
public ngOnInit(){
this.getCompetitionCategories();
}
private getCompetitionCategories(): void {
this._competitionCategoryService.getAllCompetitionCategories()
.subscribe((result: List<CompetitionCategoryDto>) => {
this.competitionCategoriesList = result;
});
}
}

View File

@ -12,6 +12,8 @@ export class SideBarNavComponent extends AppComponentBase {
menuItems: MenuItem[] = [
new MenuItem(this.l("Strona domowa"), "", "home", "/app/home"),
new MenuItem(this.l("Konkursy"), "", "list", "/app/categories-list"),
new MenuItem(this.l("Tenants"), "Pages.Tenants", "business", "/app/tenants"),
new MenuItem(this.l("Użytkownicy"), "Pages.Users", "people", "/app/users"),
new MenuItem(this.l("Role"), "Pages.Roles", "local_offer", "/app/roles"),

View File

@ -139,6 +139,74 @@ export class AccountServiceProxy {
}
}
@Injectable()
export class CompetitionCategoryServiceProxy {
private http: HttpClient;
private baseUrl: string;
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
constructor(@Inject(HttpClient) http: HttpClient, @Optional() @Inject(API_BASE_URL) baseUrl?: string) {
this.http = http;
this.baseUrl = baseUrl ? baseUrl : "";
}
/**
* @return Success
*/
getAllCompetitionCategories(): Observable<CompetitionCategoryDto[]> {
let url_ = this.baseUrl + "/api/services/app/CompetitionCategory/GetAllCompetitionCategories";
url_ = url_.replace(/[?&]$/, "");
let options_ : any = {
observe: "response",
responseType: "blob",
headers: new HttpHeaders({
"Content-Type": "application/json",
"Accept": "application/json"
})
};
return this.http.request("get", url_, options_).pipe(_observableMergeMap((response_ : any) => {
return this.processGetAllCompetitionCategories(response_);
})).pipe(_observableCatch((response_: any) => {
if (response_ instanceof HttpResponseBase) {
try {
return this.processGetAllCompetitionCategories(<any>response_);
} catch (e) {
return <Observable<CompetitionCategoryDto[]>><any>_observableThrow(e);
}
} else
return <Observable<CompetitionCategoryDto[]>><any>_observableThrow(response_);
}));
}
protected processGetAllCompetitionCategories(response: HttpResponseBase): Observable<CompetitionCategoryDto[]> {
const status = response.status;
const responseBlob =
response instanceof HttpResponse ? response.body :
(<any>response).error instanceof Blob ? (<any>response).error : undefined;
let _headers: any = {}; if (response.headers) { for (let key of response.headers.keys()) { _headers[key] = response.headers.get(key); }};
if (status === 200) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
let result200: any = null;
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
if (resultData200 && resultData200.constructor === Array) {
result200 = [];
for (let item of resultData200)
result200.push(CompetitionCategoryDto.fromJS(item));
}
return _observableOf(result200);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
}));
}
return _observableOf<CompetitionCategoryDto[]>(<any>null);
}
}
@Injectable()
export class ConfigurationServiceProxy {
private http: HttpClient;
@ -194,10 +262,6 @@ export class ConfigurationServiceProxy {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return _observableOf<void>(<any>null);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -266,14 +330,6 @@ export class RoleServiceProxy {
result200 = resultData200 ? RoleDto.fromJS(resultData200) : new RoleDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -282,6 +338,61 @@ export class RoleServiceProxy {
return _observableOf<RoleDto>(<any>null);
}
/**
* @permission (optional)
* @return Success
*/
getRolesAsync(permission: string | null | undefined): Observable<ListResultDtoOfRoleListDto> {
let url_ = this.baseUrl + "/api/services/app/Role/GetRolesAsync?";
if (permission !== undefined)
url_ += "Permission=" + encodeURIComponent("" + permission) + "&";
url_ = url_.replace(/[?&]$/, "");
let options_ : any = {
observe: "response",
responseType: "blob",
headers: new HttpHeaders({
"Content-Type": "application/json",
"Accept": "application/json"
})
};
return this.http.request("get", url_, options_).pipe(_observableMergeMap((response_ : any) => {
return this.processGetRolesAsync(response_);
})).pipe(_observableCatch((response_: any) => {
if (response_ instanceof HttpResponseBase) {
try {
return this.processGetRolesAsync(<any>response_);
} catch (e) {
return <Observable<ListResultDtoOfRoleListDto>><any>_observableThrow(e);
}
} else
return <Observable<ListResultDtoOfRoleListDto>><any>_observableThrow(response_);
}));
}
protected processGetRolesAsync(response: HttpResponseBase): Observable<ListResultDtoOfRoleListDto> {
const status = response.status;
const responseBlob =
response instanceof HttpResponse ? response.body :
(<any>response).error instanceof Blob ? (<any>response).error : undefined;
let _headers: any = {}; if (response.headers) { for (let key of response.headers.keys()) { _headers[key] = response.headers.get(key); }};
if (status === 200) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
let result200: any = null;
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
result200 = resultData200 ? ListResultDtoOfRoleListDto.fromJS(resultData200) : new ListResultDtoOfRoleListDto();
return _observableOf(result200);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
}));
}
return _observableOf<ListResultDtoOfRoleListDto>(<any>null);
}
/**
* @input (optional)
* @return Success
@ -330,14 +441,6 @@ export class RoleServiceProxy {
result200 = resultData200 ? RoleDto.fromJS(resultData200) : new RoleDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -389,14 +492,6 @@ export class RoleServiceProxy {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return _observableOf<void>(<any>null);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -449,14 +544,6 @@ export class RoleServiceProxy {
result200 = resultData200 ? ListResultDtoOfPermissionDto.fromJS(resultData200) : new ListResultDtoOfPermissionDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -512,14 +599,6 @@ export class RoleServiceProxy {
result200 = resultData200 ? GetRoleForEditOutput.fromJS(resultData200) : new GetRoleForEditOutput();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -575,14 +654,6 @@ export class RoleServiceProxy {
result200 = resultData200 ? RoleDto.fromJS(resultData200) : new RoleDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -641,14 +712,6 @@ export class RoleServiceProxy {
result200 = resultData200 ? PagedResultDtoOfRoleDto.fromJS(resultData200) : new PagedResultDtoOfRoleDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -781,14 +844,6 @@ export class TenantServiceProxy {
result200 = resultData200 ? TenantDto.fromJS(resultData200) : new TenantDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -840,14 +895,6 @@ export class TenantServiceProxy {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return _observableOf<void>(<any>null);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -903,14 +950,6 @@ export class TenantServiceProxy {
result200 = resultData200 ? TenantDto.fromJS(resultData200) : new TenantDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -969,14 +1008,6 @@ export class TenantServiceProxy {
result200 = resultData200 ? PagedResultDtoOfTenantDto.fromJS(resultData200) : new PagedResultDtoOfTenantDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1033,14 +1064,6 @@ export class TenantServiceProxy {
result200 = resultData200 ? TenantDto.fromJS(resultData200) : new TenantDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1289,14 +1312,6 @@ export class UserServiceProxy {
result200 = resultData200 ? UserDto.fromJS(resultData200) : new UserDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1353,14 +1368,6 @@ export class UserServiceProxy {
result200 = resultData200 ? UserDto.fromJS(resultData200) : new UserDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1412,14 +1419,6 @@ export class UserServiceProxy {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return _observableOf<void>(<any>null);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1472,14 +1471,6 @@ export class UserServiceProxy {
result200 = resultData200 ? ListResultDtoOfRoleDto.fromJS(resultData200) : new ListResultDtoOfRoleDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1532,14 +1523,6 @@ export class UserServiceProxy {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return _observableOf<void>(<any>null);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1595,14 +1578,6 @@ export class UserServiceProxy {
result200 = resultData200 ? UserDto.fromJS(resultData200) : new UserDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1661,14 +1636,6 @@ export class UserServiceProxy {
result200 = resultData200 ? PagedResultDtoOfUserDto.fromJS(resultData200) : new PagedResultDtoOfUserDto();
return _observableOf(result200);
}));
} else if (status === 401) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status === 403) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("A server error occurred.", status, _responseText, _headers);
}));
} else if (status !== 200 && status !== 204) {
return blobToText(responseBlob).pipe(_observableMergeMap(_responseText => {
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
@ -1874,6 +1841,53 @@ export interface IRegisterOutput {
canLogin: boolean | undefined;
}
export class CompetitionCategoryDto implements ICompetitionCategoryDto {
name: string | undefined;
id: number | undefined;
constructor(data?: ICompetitionCategoryDto) {
if (data) {
for (var property in data) {
if (data.hasOwnProperty(property))
(<any>this)[property] = (<any>data)[property];
}
}
}
init(data?: any) {
if (data) {
this.name = data["name"];
this.id = data["id"];
}
}
static fromJS(data: any): CompetitionCategoryDto {
data = typeof data === 'object' ? data : {};
let result = new CompetitionCategoryDto();
result.init(data);
return result;
}
toJSON(data?: any) {
data = typeof data === 'object' ? data : {};
data["name"] = this.name;
data["id"] = this.id;
return data;
}
clone(): CompetitionCategoryDto {
const json = this.toJSON();
let result = new CompetitionCategoryDto();
result.init(json);
return result;
}
}
export interface ICompetitionCategoryDto {
name: string | undefined;
id: number | undefined;
}
export class ChangeUiThemeInput implements IChangeUiThemeInput {
theme: string;
@ -2063,6 +2077,120 @@ export interface IRoleDto {
id: number | undefined;
}
export class ListResultDtoOfRoleListDto implements IListResultDtoOfRoleListDto {
items: RoleListDto[] | undefined;
constructor(data?: IListResultDtoOfRoleListDto) {
if (data) {
for (var property in data) {
if (data.hasOwnProperty(property))
(<any>this)[property] = (<any>data)[property];
}
}
}
init(data?: any) {
if (data) {
if (data["items"] && data["items"].constructor === Array) {
this.items = [];
for (let item of data["items"])
this.items.push(RoleListDto.fromJS(item));
}
}
}
static fromJS(data: any): ListResultDtoOfRoleListDto {
data = typeof data === 'object' ? data : {};
let result = new ListResultDtoOfRoleListDto();
result.init(data);
return result;
}
toJSON(data?: any) {
data = typeof data === 'object' ? data : {};
if (this.items && this.items.constructor === Array) {
data["items"] = [];
for (let item of this.items)
data["items"].push(item.toJSON());
}
return data;
}
clone(): ListResultDtoOfRoleListDto {
const json = this.toJSON();
let result = new ListResultDtoOfRoleListDto();
result.init(json);
return result;
}
}
export interface IListResultDtoOfRoleListDto {
items: RoleListDto[] | undefined;
}
export class RoleListDto implements IRoleListDto {
name: string | undefined;
displayName: string | undefined;
isStatic: boolean | undefined;
isDefault: boolean | undefined;
creationTime: moment.Moment | undefined;
id: number | undefined;
constructor(data?: IRoleListDto) {
if (data) {
for (var property in data) {
if (data.hasOwnProperty(property))
(<any>this)[property] = (<any>data)[property];
}
}
}
init(data?: any) {
if (data) {
this.name = data["name"];
this.displayName = data["displayName"];
this.isStatic = data["isStatic"];
this.isDefault = data["isDefault"];
this.creationTime = data["creationTime"] ? moment(data["creationTime"].toString()) : <any>undefined;
this.id = data["id"];
}
}
static fromJS(data: any): RoleListDto {
data = typeof data === 'object' ? data : {};
let result = new RoleListDto();
result.init(data);
return result;
}
toJSON(data?: any) {
data = typeof data === 'object' ? data : {};
data["name"] = this.name;
data["displayName"] = this.displayName;
data["isStatic"] = this.isStatic;
data["isDefault"] = this.isDefault;
data["creationTime"] = this.creationTime ? this.creationTime.toISOString() : <any>undefined;
data["id"] = this.id;
return data;
}
clone(): RoleListDto {
const json = this.toJSON();
let result = new RoleListDto();
result.init(json);
return result;
}
}
export interface IRoleListDto {
name: string | undefined;
displayName: string | undefined;
isStatic: boolean | undefined;
isDefault: boolean | undefined;
creationTime: moment.Moment | undefined;
id: number | undefined;
}
export class ListResultDtoOfPermissionDto implements IListResultDtoOfPermissionDto {
items: PermissionDto[] | undefined;

View File

@ -13,6 +13,7 @@ import * as ApiServiceProxies from './service-proxies';
ApiServiceProxies.TokenAuthServiceProxy,
ApiServiceProxies.AccountServiceProxy,
ApiServiceProxies.ConfigurationServiceProxy,
ApiServiceProxies.CompetitionCategoryServiceProxy,
{ provide: HTTP_INTERCEPTORS, useClass: AbpHttpInterceptor, multi: true }
]
})