Skip to content
Permalink
Browse files
worked on some employee and customer components
  • Loading branch information
pembemiriam committed May 29, 2018
1 parent 01a9bbd commit 5584af0088d6999c88b9af191c5113f780155b49
Showing 18 changed files with 363 additions and 27 deletions.
@@ -2,7 +2,7 @@
<h3 class="heading">Transaction Types</h3>
<mat-divider></mat-divider>
<div class="fineract-button">
<a mat-raised-button color="primary" [routerLink]="['/navbar/managereport/create']">
<a mat-raised-button color="primary" [routerLink]="['/navbar/add_transaction_type']">
<mat-icon>add</mat-icon>Add Transaction Type</a>
</div>
<mat-form-field>
@@ -56,7 +56,9 @@ import { TrialBalanceComponent } from './accounting/trial-balance/trial-balance.
import { ChequeClearingComponent } from './accounting/cheque-clearing/cheque-clearing.component';
import { TransactionTypeComponent } from './accounting/transaction-type/transaction-type.component';
import { AddMemberComponent } from './customer/add-member/add-member.component';
import { ManageMembersComponent } from './customer/manage-members/manage-members.component'
import { ManageMembersComponent } from './customer/manage-members/manage-members.component';
import { AddEmployeeComponent } from './employee/add-employee/add-employee.component';
import { ManageEmployeeComponent } from './employee/manage-employee/manage-employee.component'

const appRoutes: Routes = [
{ path: 'login', component: LoginComponent },
@@ -76,6 +78,9 @@ const appRoutes: Routes = [
{ path: 'cheque_clearing', component: ChequeClearingComponent },
{ path: 'transaction_type', component: TransactionTypeComponent },
{ path: 'add_member', component: AddMemberComponent },
{ path: 'manage_members', component: ManageMembersComponent },
{ path: 'add_employee', component: AddEmployeeComponent },
{ path: 'manage_employees', component: ManageEmployeeComponent },
]
}
];
@@ -85,7 +90,7 @@ const appRoutes: Routes = [
declarations: [
AppComponent,LoginComponent, NavbarComponent, DashboardComponent,
AccountingComponent, GeneralLedgerComponent, AddJournalEntryComponent,
PayrollsComponent, ChartOfAccountsComponent, AddTransactionTypeComponent, TrialBalanceComponent, ChequeClearingComponent, TransactionTypeComponent, AddMemberComponent, ManageMembersComponent
PayrollsComponent, ChartOfAccountsComponent, AddTransactionTypeComponent, TrialBalanceComponent, ChequeClearingComponent, TransactionTypeComponent, AddMemberComponent, ManageMembersComponent, AddEmployeeComponent, ManageEmployeeComponent
],
imports: [RouterModule.forRoot(appRoutes),
BrowserModule, BrowserAnimationsModule,
@@ -24,40 +24,44 @@ <h3 class="heading">Add Member</h3>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
</form>
<span>Address</span>
<span>ADDRESS</span>
<form class="fineract-form">
<mat-form-field>
<input matInput placeholder="Lastname">
<input matInput placeholder="Street">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Lastname">
<input matInput placeholder="City">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Lastname">
<input matInput placeholder="Postal code">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Lastname">
<input matInput placeholder="Country">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Region">
</mat-form-field>
</form>
<span>Contact</span>
<span>CONTACT</span>
<form class="fineract-form">
<mat-form-field>
<input matInput placeholder="Lastname">
<input matInput placeholder="Email">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Lastname">
<input matInput placeholder="Phone">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Lastname">
<input matInput placeholder="Mobile">
</mat-form-field>
</form>
<span>Assign member to office(optional)</span>
<form>
<span>ASSIGN MEMBER TO OFFICE(OPTIONAL)</span>
<form class="fineract-form">

<mat-form-field>
<mat-select placeholder="Assigned office">
@@ -72,8 +76,8 @@ <h3 class="heading">Add Member</h3>
</mat-form-field>
<button mat-raised-button color="primary">search</button>
</form>
<span>Assign member to employee(optional)</span>
<form>
<span>ASSIGN MEMBER TO EMPLOYEE(OPTIONAL)</span>
<form class="fineract-form">

<mat-form-field>
<mat-select placeholder="Assigned employee">
@@ -88,16 +92,16 @@ <h3 class="heading">Add Member</h3>
</mat-form-field>
<button mat-raised-button color="primary">search</button>
</form>
<span>Custom Fields</span>
<br/>
<span>CUSTOM FIELDS</span>
<form class="fineract-form">
<mat-form-field>
<input matInput placeholder="Sample customer field">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="employer">
</mat-form-field>

</form>
<div>
<button mat-raised-button class="button1" color="primary">Submit</button>
<button mat-raised-button class="button2" color="warn">Cancel</button>
@@ -1,3 +1,47 @@
<p>
manage-members works!
</p>
<div class="main-div mat-elevation-z2">
<h3 class="heading">Manage Members</h3>
<mat-divider></mat-divider>
<div class="fineract-button">
<a mat-raised-button color="primary" [routerLink]="['/navbar/add_member']">
<mat-icon>add</mat-icon>Add Member</a>
</div>
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Filter by firstName/lastName">
</mat-form-field>

<br>
<mat-divider></mat-divider>

<mat-table #table [dataSource]="dataSource">

<!-- Position Column -->
<ng-container matColumnDef="id">
<mat-header-cell *matHeaderCellDef>Code</mat-header-cell>
<mat-cell *matCellDef="let element">
<a routerLink="{{element.id}}">{{element.id}}</a>
</mat-cell>
</ng-container>

<!-- Name Column -->
<ng-container matColumnDef="firstName">
<mat-header-cell *matHeaderCellDef>First Name</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.firstName}} </mat-cell>
</ng-container>

<ng-container matColumnDef="lastName">
<mat-header-cell *matHeaderCellDef>Last Name</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.lastName}} </mat-cell>
</ng-container>

<ng-container matColumnDef="status">
<mat-header-cell *matHeaderCellDef>Current Status</mat-header-cell>
<mat-cell *matCellDef="let element"> {{element.status}} </mat-cell>
</ng-container>

<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>


</div>

@@ -0,0 +1,16 @@
.my-div{
margin-left: 2%;
margin-right:2%;
border-radius: 5px 5px 5px 5px;
background-color: #e6e6ff;
min-height: 100%;

}
table {
width: 100%;
}

.mat-form-field {
font-size: 14px;
width: 100%;
}
@@ -1,15 +1,35 @@
import { Component, OnInit } from '@angular/core';
import {MatTableDataSource} from '@angular/material';

@Component({
selector: 'app-manage-members',
templateUrl: './manage-members.component.html',
styleUrls: ['./manage-members.component.scss']
})
export class ManageMembersComponent implements OnInit {
displayedColumns = ['id','firstName','lastName','status'];
dataSource = new MatTableDataSource(ELEMENT_DATA);

applyFilter(filterValue: string) {
filterValue = filterValue.trim(); // Remove whitespace
filterValue = filterValue.toLowerCase(); // MatTableDataSource defaults to lowercase matches
this.dataSource.filter = filterValue;
}

constructor() { }

ngOnInit() {
}

}
export interface Element {
id: number;
firstName: string;
lastName: string;
status: boolean;

}

const ELEMENT_DATA: Element[] = [

];
@@ -2,7 +2,7 @@
<span>Clients</span>
<mat-list>
<mat-list-item>
<span>View Members</span> &nbsp;|
<a [routerLink]="['/navbar/manage_members']">View Members</a> &nbsp;|
&nbsp;<span>View Groups</span>
</mat-list-item>
</mat-list>
@@ -21,7 +21,7 @@
<mat-list>
<mat-list-item>
<span>View Offices</span>&nbsp;|
&nbsp;<span>View Employees</span>
&nbsp;<a [routerLink]="['/navbar/manage_employees']">View Employees</a>
</mat-list-item>
</mat-list>
</mat-card>
@@ -0,0 +1,63 @@
<div class="main-div mat-elevation-z2">
<h3 class="heading">Add Employee</h3>
<mat-divider></mat-divider>
<span>EMPLOYEE DETAILS</span>
<form class="fineract-form">
<mat-form-field>
<input matInput placeholder="username">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Firstname">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Middlename">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Lastname">
</mat-form-field>
<br/>
<mat-form-field>
<mat-select placeholder="Role">
<mat-option *ngFor="let office of offices" [value]="office.value">
{{ office.viewValue }}
</mat-option>
</mat-select>
</mat-form-field>
<br/>
<mat-form-field>
<mat-select placeholder="Office(optional)">
<mat-option *ngFor="let office of offices" [value]="office.value">
{{ office.viewValue }}
</mat-option>
</mat-select>
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Enter your password" [type]="hide ? 'password' : 'text'">

</mat-form-field>

</form>

<span>EMPLOYEE CONTACT(OPTIONAL)</span>
<form class="fineract-form">
<mat-form-field>
<input matInput placeholder="Email">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Phone">
</mat-form-field>
<br/>
<mat-form-field>
<input matInput placeholder="Mobile">
</mat-form-field>
</form>
<div>
<button mat-raised-button class="button1" color="primary">Submit</button>
<button mat-raised-button class="button2" color="warn">Cancel</button>
</div>
</div>
@@ -0,0 +1,13 @@
.fineract-form {
min-width: 150px;
max-width: 500px;
width: 100%;
}
.button1{
margin-left: 50%;

}
.button1, .button2{
width:20px;
display: inline-block;
}
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { AddEmployeeComponent } from './add-employee.component';

describe('AddEmployeeComponent', () => {
let component: AddEmployeeComponent;
let fixture: ComponentFixture<AddEmployeeComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddEmployeeComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(AddEmployeeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,27 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-add-employee',
templateUrl: './add-employee.component.html',
styleUrls: ['./add-employee.component.scss']
})
export class AddEmployeeComponent implements OnInit {

hide = true;

offices = [
{value: 'office-1', viewValue: 'Head office'},

];

employees = [
{value: '', viewValue: ''},

];

constructor() { }

ngOnInit() {
}

}

0 comments on commit 5584af0

Please sign in to comment.