Skip to content

Commit

Permalink
Merged in TanTrinhHoang/tan-mini-project/features/LIM2018-112 (pull r…
Browse files Browse the repository at this point in the history
…equest #38)

Features/LIM2018-112
  • Loading branch information
Tan Trinh Hoang authored and dinhnguyen-groove committed Jul 9, 2018
2 parents 5e8e728 + 1aa29fd commit 0d75531
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@

<h1>Welcome {{userName}} !!!</h1>
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { SharingService } from '../shared/sevices/sharing-service.service';

@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
public userName: string;

constructor(
private route: Router
private route: Router,
private shareingService: SharingService
) { }

ngOnInit() {
var name = this.shareingService.getName();
this.userName = name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<a routerLink="/request/list" routerLinkActive="hold" class=" list-group-item list-group-item-action"><i class="fas fa-list-alt layout"></i> Request</a>
</li>
<li *ngIf="isRole=='Customer'">
<a class=" list-group-item list-group-item-action "><i class="fas fa-warehouse"></i> Warehouse</a>
<a class=" list-group-item list-group-item-action " (click)="displayToastr()"><i class="fas fa-warehouse"></i> Warehouse</a>
</li>
<li *ngIf="isRole=='Coordinator' || isRole=='Driver'">
<a routerLink="/shipment" routerLinkActive="hold" class=" list-group-item list-group-item-action"><i class="fas fa-shipping-fast"></i> Shipment</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container-fluid">
<div class="border-custom">
<h1>Create User</h1>
<h1 class="heading">Create User</h1>
</div>
<div class="py-2">
<div class="card">
Expand Down Expand Up @@ -96,11 +96,12 @@ <h1>Create User</h1>


<label class="k-form-field">
<span>Role</span>
<span>Role <span class="k-required">*</span></span>
<kendo-dropdownlist [data]="listItems"
style="width:100%;"
[(ngModel)]="model.role"
name="role" #role="ngModel">
name="role" #role="ngModel"
required>
</kendo-dropdownlist>
</label>
<div [ngClass]="{'hidden': role.valid || role.pristine}" class="validation-message">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container-fluid">
<div class="border-custom">
<h1>User Detail</h1>
<h1 class="heading">User Detail</h1>
</div>
<div class="container pt-2">
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container-fluid">
<div class="border-custom">
<h1>Update User</h1>
<h1 class="heading">Update User</h1>
</div>
<div class="py-2">
<div class="card">
Expand Down Expand Up @@ -53,7 +53,8 @@ <h1>Update User</h1>
<kendo-dropdownlist [data]="listItems"
style="width:100%;"
[(ngModel)]="model.role"
name="role" #role="ngModel">
name="role" #role="ngModel"
required>
</kendo-dropdownlist>
</label>
<div [ngClass]="{'hidden': role.valid || role.pristine}" class="validation-message">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container-fluid">
<div class="border-custom">
<h1>Account List</h1>
<h1 class="heading">Account List</h1>
</div>

<div class="py-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ <h1 class="heading">Request Management</h1>
[filter]="true"
[pageable]="true"
filterable="menu"
[sortable]="true"
[pageSize]="state.take"
[skip]="state.skip"
[sort]="state.sort"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ <h1 *ngIf="isCreateForm">Create Shipment</h1>
[pageSize]="state.take"
[sort]="state.sort"
[scrollable]="'scrollable'"

[pageable]="true"
[height]="350"

(remove)="removeHandler($event)"
required>

Expand Down
2 changes: 1 addition & 1 deletion GoGo/Applications/GoGoSpa/Client-App/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ button.toast-close-button {

.heading {
padding-top: 0.5em;
color: red;
color: dimgray;
}

.k-list-container .k-button.k-state-active, .k-list-container .k-button:active, .k-list-optionlabel.k-state-selected, .k-list .k-item.k-state-selected, .k-menu-group .k-item.k-state-selected, .k-menu.k-context-menu .k-item.k-state-selected, .k-spreadsheet-popup .k-button.k-state-active, .k-spreadsheet-popup .k-button.k-state-selected, .k-spreadsheet-popup .k-button:active {
Expand Down
4 changes: 2 additions & 2 deletions GoGo/Applications/GoGoSpa/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"ServiceRegistry": {
// "api": "http://localhost:65090"
//"api": "http://localhost:54520"
"api": "http://localhost:50279"
//"api": "http://localhost:54520"
//"api": "http://localhost:50279"
"api": "http://localhost:54520"
//"api": "http://localhost:62772"
//"api": "http://localhost:50268"
}
Expand Down
30 changes: 15 additions & 15 deletions GoGo/Infrastructures/Infrastructures.SeedData/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ private static async Task SeedDataAsync(ApplicationDbContext dbContext)
SeedFeatureOfVehicleData(dbContext);

SeedRequestData(dbContext);
SeedShipmentData(dbContext);
SeedShipmentRequestData(dbContext);
//SeedShipmentData(dbContext);
//SeedShipmentRequestData(dbContext);
SeedVehicleFeatureRequest(dbContext);
}

Expand Down Expand Up @@ -151,8 +151,8 @@ private static void SeedVehicleFeatureRequest(ApplicationDbContext dbContext)
private static async Task SeedCustomerDataAsync(ApplicationDbContext dbContext)
{
Console.WriteLine("Start to seed user info");
string[] name = { "Chi", "Cong", "Cuong", "Cao", "Cuc" };
string[] lastname = { "Tran", "Nguyen", "Trinh", "Le", "Mai" };
string[] name = { "Jacob", "Michael", "Joshua", "Matthew", "Daniel" };
string[] lastname = { "Smith", "Johnson", "Williams", "Brown", "Jones" };
Random random = new Random();
var userManagement = _serviceProvider.GetService<UserManager<User>>();
for (int i = 0; i < 5; i++)
Expand Down Expand Up @@ -190,8 +190,8 @@ private static async Task SeedDriverDataAsync(ApplicationDbContext dbContext)
{
// TODO: Refact Seed data to be English base
Console.WriteLine("Start to seed user info");
string[] name = { "Dung", "Danh", "Diem", "Duy", "Diep" };
string[] lastname = { "Tran", "Nguyen", "Trinh", "Le", "Mai" };
string[] name = { "Christopher", "Andrew", "Ethan", "Joseph", "William" };
string[] lastname = { "Miller", "Davis", "Garcia", "Rodriguez", "Wilson" };
Random random = new Random();
var userManagement = _serviceProvider.GetService<UserManager<User>>();
for (int i = 0; i < 5; i++)
Expand Down Expand Up @@ -228,8 +228,8 @@ private static async Task SeedDriverDataAsync(ApplicationDbContext dbContext)
private static async Task SeedCoordinatorDataAsync(ApplicationDbContext dbContext)
{
Console.WriteLine("Start to seed user info");
string[] name = { "Khanh", "Khoi", "Khoa", "Khang", "Khai" };
string[] lastname = { "Tran", "Nguyen", "Trinh", "Le", "Mai" };
string[] name = { "Anthony", "David", "Alexander", "Nicholas", "Ryan" };
string[] lastname = { "Martinez", "Anderson", "Taylor", "Thomas", "Hernandez" };
Random random = new Random();
var userManagement = _serviceProvider.GetService<UserManager<User>>();
for (int i = 0; i < 5; i++)
Expand Down Expand Up @@ -266,8 +266,8 @@ private static async Task SeedCoordinatorDataAsync(ApplicationDbContext dbContex
private static async Task SeedAdministratortDataAsync(ApplicationDbContext dbContext)
{
Console.WriteLine("Start to seed user info");
string[] name = { "An", "Anh", "Ai", "At", "Au" };
string[] lastname = { "Tran", "Nguyen", "Trinh", "Le", "Mai" };
string[] name = { "Tyler", "James", "John", "Jonathan", "Noah" };
string[] lastname = { "Moore", "Martin", "Jackson", "Thompson", "White" };
Random random = new Random();
var userManagement = _serviceProvider.GetService<UserManager<User>>();
for (int i = 0; i < 5; i++)
Expand Down Expand Up @@ -486,8 +486,8 @@ private static void SeedRequestData(ApplicationDbContext dbContext)
Random ran = new Random();

string phonenumberHeader = "0908";
string[] name = { "Khanh", "Khoi", "Khoa", "Khang", "Khai", "Chi", "Cong", "Cuong", "Cao", "Cuc", "Dung", "Danh", "Diem", "Duy", "Diep" };
string[] lastname = { "Tran", "Nguyen", "Trinh", "Le", "Mai" };
string[] name = { "Brandon", "Christian", "Dylan", "Samuel", "Benjamin", "Nathan", "Zachary", "Logan", "Justin", "Gabriel", "Jose", "Austin", "Kevin", "Elijah", "Caleb" };
string[] lastname = { "Lopez", "Lee", "Gonzalez", "Harriz", "Clark" };

for (int i = 1; i < 26; i++)
{
Expand All @@ -500,9 +500,9 @@ private static void SeedRequestData(ApplicationDbContext dbContext)
PackageQuantity = i,
DeliveryLatitude = Math.Round(latitudeBase + i * 0.01, 6),
DeliveryLongitude = Math.Round(longitudeBase + i * 0.01, 6),
WareHouseId = i,
WareHouseId = i%5+1,
IssuerId = i + 76,
Status = "Pending",
Status = "Inactive",
ReceiverName = name[ran.Next(0, 14)] + lastname[ran.Next(0, 4)],
ReceiverPhoneNumber = phonenumberHeader + ran.Next(100000, 999999).ToString(),
Address = "37 ĐT743C, Xã Bình Thắng, Dĩ An, Bình Dương, Vietnam",
Expand Down Expand Up @@ -553,7 +553,7 @@ private static void SeedShipmentRequestData(ApplicationDbContext dbContext)
RequestId = (i * 5) + j + 1,
RequestOrder = j + 1,
Note = "",
Status = "Pending",
Status = "Waiting",
RequestEstimateDate = RequestEstimateDate.AddDays(ran.Next(0, i % 2 + 1)),
RequestDeliveriedDate = RequestEstimateDate.AddDays(ran.Next(2, i % 7 + 3))
};
Expand Down

0 comments on commit 0d75531

Please sign in to comment.