Skip to content

Commit

Permalink
fix: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-haji committed Aug 15, 2018
1 parent 01db181 commit 1d9ebeb
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 30 deletions.
10 changes: 5 additions & 5 deletions src/app/pages/reviews/list/table.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ export const TABLE_CONFIG = {
confirmDelete: true,
},
actions: {
add: false,
edit: false,
delete: false
add: true,
edit: true,
delete: true
},
columns: {
title: {
name: {
title: 'عنوان',
type: 'string',
},
status: {
title: 'وضعیت',
type: 'string',
},
created: {
createdAt: {
title: 'تاریخ ثبت نام',
type: 'date',
},
Expand Down
12 changes: 0 additions & 12 deletions src/app/pages/users/add/add-user.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ export class AddUserComponent implements OnInit {
}

ngOnInit() {
// this.apiDataProviderService.createApi('users').getAll().subscribe(res => {
// console.log('getAll ', res);
// });
// this.apiDataProviderService.createApi('users').getById().subscribe(res => {
// console.log('getById ', res);
// });
// this.apiDataProviderService.createApi('users').create({
// firstName: 'mohammad',
// lastName: 'haji'
// }).subscribe(res => {
// console.log('getById ', res);
// });
this.initPageWithConfig(_.cloneDeep(this.activatedRoute.snapshot.data));
}

Expand Down
8 changes: 5 additions & 3 deletions src/app/pages/users/list/table.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const TABLE_CONFIG = {
mode: 'external',
add: {
addButtonContent: '<i class="nb-plus"></i>',
createButtonContent: '<i class="nb-checkmark"></i>',
Expand All @@ -8,15 +9,16 @@ export const TABLE_CONFIG = {
editButtonContent: '<i class="nb-edit"></i>',
saveButtonContent: '<i class="nb-checkmark"></i>',
cancelButtonContent: '<i class="nb-close"></i>',
confirmSave: true
},
delete: {
deleteButtonContent: '<i class="nb-trash"></i>',
confirmDelete: true,
},
actions: {
add: false,
edit: false,
delete: false,
add: true,
edit: true,
delete: true,
},
columns: {
id: {
Expand Down
28 changes: 26 additions & 2 deletions src/app/pages/users/users-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,35 @@ const routes: Routes = [{
form: FormLoaderService,
}
}, {
path: 'detail',
path: 'detail/:id',
component: DetailUserComponent,
}, {
path: 'edit',
path: 'edit/:id',
component: EditUserComponent,
data: {
TITLE_TAG_KEY: 'users.edit',
pageTitle: 'ویرایش کاربر',
forms: {
basic_info: {
title: 'اطلاعات اصلی',
containerClass: 'col-sm-6',
path: 'users/basic-info-users'
},
edit_users: {
title: 'فرم نقش های کاربر',
containerClass: 'col-sm-6',
path: 'users/edit-users'
},
add_users: {
title: 'اطلاعات پایه کاربر',
containerClass: 'col-sm-6',
path: 'users/add-users'
},
}
},
resolve: {
form: FormLoaderService,
}
}, {
path: 'list',
component: ListUserComponent,
Expand Down
5 changes: 5 additions & 0 deletions src/assets/config/api/api-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@
"url": "/user/:id",
"method": "GET"
}
},
"comments": {
"getAll": {
"url": "/comments"
}
}
}
21 changes: 21 additions & 0 deletions src/assets/config/title-tags/title-tags.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,27 @@
"content": "ngir عالی است"
}
]
},
"edit": {
"title": "ویرایش کاربر",
"metaTags": [
{
"name": "twitter:card",
"content": "summary_large_image"
},
{
"name": "twitter:site",
"content": "ngir"
},
{
"name": "twitter:description",
"content": "بهترین فروشگاه ایران"
},
{
"name": "twitter:title",
"content": "ngir عالی است"
}
]
}
},
"products": {
Expand Down
4 changes: 0 additions & 4 deletions src/assets/data/menus/side-bar-menu-fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
"icon": "nb-keypad",
"link": "/pages/users",
"children": [
{
"title": "افزودن کاربر جدید",
"link": "/pages/users/add"
},
{
"title": "لیست کاربران",
"link": "/pages/users/list"
Expand Down
4 changes: 0 additions & 4 deletions src/assets/data/menus/side-bar-menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
"icon": "nb-keypad",
"link": "/pages/users",
"children": [
{
"title": "افزودن کاربر جدید",
"link": "/pages/users/add"
},
{
"title": "لیست کاربران",
"link": "/pages/users/list"
Expand Down

0 comments on commit 1d9ebeb

Please sign in to comment.