-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from origami-team/v1.0.2
V1.0.2
- Loading branch information
Showing
28 changed files
with
782 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export interface IUser { | ||
export interface IUser { //--- ToDo | ||
username: { | ||
type: string; | ||
value: string; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,5 @@ ion-content { | |
ion-input { | ||
padding-top: 0.5rem !important; | ||
padding-bottom: 0.5rem !important; | ||
margin-top: 5%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/app/pages/user/user-management/user-management.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import { FormsModule } from '@angular/forms'; | ||
|
||
import { IonicModule } from '@ionic/angular'; | ||
|
||
|
||
import { UserManagementPage } from './user-management.page'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
|
||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: UserManagementPage | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
FormsModule, | ||
IonicModule, | ||
RouterModule.forChild(routes), | ||
TranslateModule | ||
], | ||
declarations: [UserManagementPage] | ||
}) | ||
export class UserManagementPageModule {} |
56 changes: 56 additions & 0 deletions
56
src/app/pages/user/user-management/user-management.page.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-buttons slot="start"> | ||
<ion-back-button color="dark" defaultHref="/" text="{{ 'General.back_button' | translate }}"></ion-back-button> | ||
</ion-buttons> | ||
<ion-title> User Management</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-content class="ion-padding"> | ||
|
||
<h3>Users list</h3> | ||
|
||
<ion-grid> | ||
<ion-row class="ion-justify-content-start" style="background-color: #d0def8"> | ||
<ion-col size="1"> # </ion-col> | ||
<ion-col size="1.5"> Name </ion-col> | ||
<ion-col size="3"> Email </ion-col> | ||
<ion-col size="2"> Created date </ion-col> | ||
<ion-col size="2"> Role </ion-col> | ||
<ion-col size="2"> Action </ion-col> | ||
</ion-row> | ||
|
||
<ion-row *ngFor=" let user of users; index as i" class="ion-justify-content-start" | ||
style="border-bottom: 1px solid grey;" [ngStyle]="{ 'background-color' : i%2 ? '#ecebeb' : ''}"> | ||
<ion-col size="1"> {{ i+1 }} </ion-col> | ||
<ion-col size="1.5"> {{ user.username }} </ion-col> | ||
<ion-col size="3"> {{ user.email }} </ion-col> | ||
<ion-col size="2"> {{ user.createdAt.slice(0, 19) }} </ion-col> | ||
<ion-col size="2"> | ||
<!-- <ion-item> --> | ||
<ion-list> | ||
<!-- <ion-select interface="popover" placeholder="{{ user.roles[0] }}" ngmodel="{{ user.roles[0]}}"> --> | ||
<ion-select interface="popover" value="{{ user.roles[0]}}" (ionChange)="changeRole(i, $event.detail.value)" [ngStyle]="{ 'background-color' : i%2 ? '#ecebeb' : ''}"> | ||
<ion-select-option value="admin">admin</ion-select-option> | ||
<ion-select-option value="scholar">scholar</ion-select-option> | ||
<ion-select-option value="user">user</ion-select-option> | ||
</ion-select> | ||
</ion-list> | ||
<!-- </ion-item> --> | ||
</ion-col> | ||
<ion-col size="2"> | ||
<ion-buttons> | ||
<ion-button (click)="saveRoleUpdate(i)" disabled = "{{!user.roleIsUpdated}}"> | ||
<ion-icon name="save-sharp" color="{{ user.roleIsUpdated?'primary':'dark'}}"></ion-icon> | ||
</ion-button> | ||
|
||
<ion-button (click)="dismissModal(null)"> | ||
<ion-icon name="trash-outline"></ion-icon> | ||
</ion-button> | ||
</ion-buttons> | ||
</ion-col> | ||
</ion-row> | ||
</ion-grid> | ||
|
||
</ion-content> |
12 changes: 12 additions & 0 deletions
12
src/app/pages/user/user-management/user-management.page.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ion-col { | ||
text-align: start; | ||
|
||
> ion-buttons ,ion-button, ion-icon{ | ||
padding: 0rem; | ||
margin: 0rem; | ||
} | ||
} | ||
|
||
ion-list, ion-select{ | ||
padding: 0rem; | ||
} |
Oops, something went wrong.