Commit 473a5200 authored by 伊藤雄大's avatar 伊藤雄大

2024/07/12

調整
parent 7fd6134c
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -24,6 +24,7 @@
"@ng-bootstrap/ng-bootstrap": "^17.0.0",
"@popperjs/core": "^2.11.8",
"ag-grid-angular": "^31.3.2",
"aws-amplify": "^6.4.0",
"bootstrap": "^5.3.2",
"jquery": "^3.7.1",
"jqwidgets-ng": "^19.2.2",
......@@ -49,4 +50,4 @@
"typescript": "~5.4.2",
"typescript-eslint": "8.0.0-alpha.20"
}
}
\ No newline at end of file
}
......@@ -5,7 +5,7 @@
タッチ決済サービス
</td>
@if (mode === 1) {
<td class="logout" style="text-align: right;">
<td class="logout" style="text-align: right;padding-right:20px;padding-top:5px;">
<div role="button" (click)="onClickLogout()">ログアウト</div>
</td>
}
......
......@@ -5,6 +5,9 @@ import { ColDef, GridApi } from 'ag-grid-community';
import { SizeColumnsToFitGridStrategy, SizeColumnsToFitProvidedWidthStrategy, SizeColumnsToContentStrategy } from 'ag-grid-community'
import { DenyListService } from '../../service/deny-list.service';
/**
* 拒否リスト
*/
@Component({
selector: 'app-deny-list',
templateUrl: './deny-list.component.html',
......
import { Component } from '@angular/core';
import { ICellRendererParams } from 'ag-grid-community';
/**
* クレジットカード番号表示
*/
@Component({
selector: 'app-card-renderer',
templateUrl: './card-renderer.component.html',
......
import { Component } from '@angular/core';
import { ICellRendererParams } from 'ag-grid-community';
/**
* 拒否リスト削除依頼表示
*/
@Component({
selector: 'app-delreq',
templateUrl: './delreq.component.html',
......
import { Component } from '@angular/core';
import { ICellRendererParams } from 'ag-grid-community';
/**
* 売上日表示
*/
@Component({
selector: 'app-earning-date',
templateUrl: './earning-date.component.html',
......@@ -10,8 +13,11 @@ export class EarningDateComponent {
//パラメータ
params: any;
//年
year?: string;
//月
month?: string;
//日
day?: string;
/**
......
......@@ -12,6 +12,9 @@ import { NgComponent } from './ng/ng.component';
import { DelreqComponent } from './delreq/delreq.component';
import { EarningListService } from '../../service/earning-list.service';
/**
* 売上情報一覧
*/
@Component({
selector: 'app-earning-list',
templateUrl: './earning-list.component.html',
......
import { Component } from '@angular/core';
import { ICellRendererParams } from 'ag-grid-community';
/**
* 降車日時表示
*/
@Component({
selector: 'app-getoff-datetime',
templateUrl: './getoff-datetime.component.html',
......@@ -10,11 +13,17 @@ export class GetoffDatetimeComponent {
//パラメータ
params: any;
//年
year?: string;
//月
month?: string;
//日
day?: string;
//時
hour?: string;
//分
minute?: string;
//秒
second?: string;
/**
......
import { Component } from '@angular/core';
import { ICellRendererParams } from 'ag-grid-community';
/**
* 乗車日時
*/
@Component({
selector: 'app-geton-datetime',
templateUrl: './geton-datetime.component.html',
......@@ -10,11 +13,17 @@ export class GetonDatetimeComponent {
//パラメータ
params: any;
//年
year?: string;
//月
month?: string;
//日
day?: string;
//時
hour?: string;
//分
minute?: string;
//秒
second?: string;
/**
......
import { Component } from '@angular/core';
import { ICellRendererParams } from 'ag-grid-community';
/**
* NGフラグ表示
*/
@Component({
selector: 'app-ng',
templateUrl: './ng.component.html',
......
import { Component } from '@angular/core';
import { ICellRendererParams } from 'ag-grid-community';
/**
* 処理日時表示
*/
@Component({
selector: 'app-processdatetime',
templateUrl: './processdatetime.component.html',
......@@ -10,11 +13,17 @@ export class ProcessDatetimeComponent {
//パラメータ
params: any;
//年
year?: string;
//月
month?: string;
//日
day?: string;
//時
hour?: string;
//分
minute?: string;
//秒
second?: string;
/**
......
import { Component } from '@angular/core';
import { ICellRendererParams } from 'ag-grid-community';
/**
* ステータス表示
*/
@Component({
selector: 'app-status',
templateUrl: './status.component.html',
......
......@@ -7,6 +7,9 @@ import { StatusLinkComponent } from './status-link/status-link.component';
import { StatusUpdateService } from '../../service/status-update.service';
import { HistoryService } from '../../service/history.service';
/**
* 乗降履歴
*/
@Component({
selector: 'app-history-list',
templateUrl: './history-list.component.html',
......
......@@ -2,6 +2,9 @@ import { ICellRendererAngularComp } from 'ag-grid-angular';
import { ICellRendererParams } from 'ag-grid-community';
import { Component } from '@angular/core';
/**
* ステータスリンク表示
*/
@Component({
selector: 'app-status-link',
templateUrl: './status-link.component.html',
......
......@@ -2,25 +2,43 @@ import { Component, OnInit } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { HistoryModel } from '../../../model/history.model';
/**
* ステータス更新
*/
@Component({
selector: 'app-status-update',
templateUrl: './status-update.component.html',
styleUrl: './status-update.component.css'
})
export class StatusUpdateComponent implements OnInit {
//乗降履歴
model?: HistoryModel;
//ステータス
status?: string;
/**
* コンストラクタ
* @param activeModal モーダル
*/
constructor(private activeModal: NgbActiveModal) { }
/**
* 初期処理
*/
ngOnInit(): void {
this.status = "0";
}
/**
* 閉じる
*/
onClickClose(): void {
this.activeModal.dismiss();
}
/**
* 更新
*/
onClickUpdate(): void {
this.activeModal.close();
}
......
......@@ -40,11 +40,6 @@ export class PassFareComponent implements OnInit {
//運賃
fare = 0;
/**
* コンストラクタ
*/
constructor() { }
/**
* 初期処理
*/
......
......@@ -2,20 +2,29 @@
<div class="container" style="max-width:100%;height:96%;">
<div class="row h-100">
<div class="col-md-auto border">
@if (role && role.staffRole !== 0) {
<div class="common-link" role="button" style="margin-top:20px;" (click)="onClickBusiness()">事業所担当者</div>
}
@if (role && role.userRole !== 0) {
<div class="common-link" role="button" style="margin-top:10px;" (click)="onClickUser()">利用者検索</div>
}
@if (role && role.earningList !== 0) {
<div class="common-link" role="button" style="margin-top:10px;" (click)="onClickEarning()">売上予定一覧</div>
}
@if (role && role.masterRole !== 0) {
<div class="common-link" role="button" style="margin-top:10px;" (click)="onClickRoleMst()">権限マスタ</div>
<!-- div class="common-link" type="button" style="margin-top:10px;" (click)="onClickPassFare()">定期券運賃マスタ</div -->
}
</div>
<div class="col">
@if (mode === 1) {
<app-staff-list (clickNew)="onClickNew()" (clickEdit)="onClickEdit($event)"></app-staff-list>
<app-staff-list [agencyId]="agencyId" [role]="role" (clickNew)="onClickNew()"
(clickEdit)="onClickEdit($event)"></app-staff-list>
} @else if (mode === 11) {
<app-staff-regist [mode]="staffEditMode" [staffInfoModel]="staffInfoModel"
(clickBack)="onClickRegist()"></app-staff-regist>
} @else if (mode === 2) {
<app-user-list (clickPass)="onClickPass($event)" (clickHistory)="onClickHistory($event)"
<app-user-list [role]="role" (clickPass)="onClickPass($event)" (clickHistory)="onClickHistory($event)"
(clickDenyList)="onClickDenyList($event)"></app-user-list>
} @else if (mode === 21) {
<app-pass-list [model]="userInfoModel"></app-pass-list>
......
......@@ -2,14 +2,25 @@ import { Component } from '@angular/core';
import { StaffInfoModel } from '../model/staff-info.model';
import { PassModel } from '../model/pass.model';
import { UserInfoModel } from '../model/user-info.model';
import { RouteService } from '../service/route.service';
import { RouterEvent } from '@angular/router';
import { RoleModel } from '../model/role.model';
/**
* メニュー
*/
@Component({
selector: 'app-menu',
templateUrl: './menu.component.html',
styleUrl: './menu.component.css'
})
export class MenuComponent {
//モード(1:事業所担当者、2:利用者検索、21:利用者登録・更新、3:権限マスタ、4:定期券運賃マスタ)
//事業所ID
agencyId?: string;
//権限情報
role?: RoleModel;
//モード(1:事業所担当者、2:利用者検索、21:利用者登録・更新、3:権限マスタ、5:売上一覧)
mode = 1;
//担当者編集モード(0:登録、1:編集)
......@@ -24,6 +35,30 @@ export class MenuComponent {
//定期券情報
passModel?: PassModel;
/**
* コンストラクタ
* @param routeService 画面遷移サービス
*/
constructor(private routeService: RouteService) {
this.agencyId = routeService.agencyId;
this.role = routeService.role;
if (this.role?.staffRole !== 0) {
this.mode = 1;
} else {
if (this.role?.userRole !== 0) {
this.mode = 2;
} else {
if (this.role.earningList !== 0) {
this.mode = 5;
} else {
if (this.role.masterRole !== 0) {
this.mode = 3;
}
}
}
}
}
/**
* 事業所担当者
*/
......
......@@ -7,6 +7,9 @@ import { UserInfoModel } from '../../model/user-info.model';
import { PassRefundService } from '../../service/pass-refund.service';
import { PassService } from '../../service/pass.service';
/**
* 定期券一覧
*/
@Component({
selector: 'app-pass-list',
templateUrl: './pass-list.component.html',
......
......@@ -2,19 +2,33 @@ import { Component } from '@angular/core';
import { PassModel } from '../../../model/pass.model';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
/**
* 払戻ダイアログ
*/
@Component({
selector: 'app-pass-refund',
templateUrl: './pass-refund.component.html',
styleUrl: './pass-refund.component.css'
})
export class PassRefundComponent {
//定期情報
model?: PassModel;
//購入金額
purphaseAmount = 0;
//通常運賃
standardFare = 0;
//使用日
useDays = 0;
//払戻手数料
refundFee = 0;
//払戻額
refundAmount = 0;
/**
* コンストラクタ
* @param activeModal モーダル
*/
constructor(private activeModal: NgbActiveModal) { }
/**
......
<input type="button" class="form-control" style="width:80px;height:38px;line-height: 38px;" data-row="row"
(click)="onClickRefund()" value="払戻">
\ No newline at end of file
<input type="button" class="form-control" style="width:80px;height:38px;" data-row="row" (click)="onClickRefund()"
value="払戻">
\ No newline at end of file
......@@ -2,6 +2,9 @@ import { ICellRendererAngularComp } from 'ag-grid-angular';
import { ICellRendererParams } from 'ag-grid-community';
import { Component } from '@angular/core';
/**
* 払戻ボタン
*/
@Component({
selector: 'app-refund-button',
templateUrl: './refund-button.component.html',
......
<input type="button" class="form-control" style="width:60px;height:38px;line-height: 38px;" data-row="row"
(click)="onClickEdit()" value="編集">
\ No newline at end of file
<input type="button" class="form-control" style="width:60px;height:38px;" data-row="row" (click)="onClickEdit()"
value="編集">
\ No newline at end of file
......@@ -4,15 +4,21 @@
<span>事業所</span>
</td>
<td style="padding-left:10px;">
@if (role?.staffRole === 2) {
<select class="form-select" [(ngModel)]="agencyId">
@for (item of agencyList|keyvalue;track item.key) {
<option [value]="item.key">{{item.value}}</option>
}
</select>
} @else {
<span>{{agencyName}}</span>
}
</td>
@if (role?.staffRole === 2) {
<td style="padding-left:10px;">
<input type="button" class="btn common-button" value="検索" (click)="onClickSearch()" />
</td>
}
</tr>
</table>
<table style="margin-top:10px;">
......
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { StaffInfoModel } from '../../model/staff-info.model';
import { CustomButtonComponent } from './custom-button/custom-button.component';
import { ColDef, GridApi } from 'ag-grid-community';
import { SizeColumnsToFitGridStrategy, SizeColumnsToFitProvidedWidthStrategy, SizeColumnsToContentStrategy } from 'ag-grid-community'
import { StaffService } from '../../service/staff.service';
import { RoleModel } from '../../model/role.model';
/**
* 事業所担当者一覧
......@@ -14,11 +15,15 @@ import { StaffService } from '../../service/staff.service';
styleUrl: './staff-list.component.css'
})
export class StaffListComponent implements OnInit {
//事業所ID
@Input() agencyId?: string;
//権限情報
@Input() role?: RoleModel;
@Output() clickNew: EventEmitter<void> = new EventEmitter<void>();
@Output() clickEdit: EventEmitter<StaffInfoModel> = new EventEmitter<StaffInfoModel>();
//事業所ID
agencyId = "";
//事業所
agencyName?: string;
//事業所一覧
agencyList = new Map<string, string>();
//担当者一覧
......@@ -67,7 +72,13 @@ export class StaffListComponent implements OnInit {
*/
ngOnInit(): void {
this.agencyList = this.staffService.getAgencyList();
this.agencyId = this.agencyList.keys().next().value;
if (this.agencyId) {
this.agencyName = this.agencyList.get(this.agencyId);
//担当者一覧取得
this.staffList = this.staffService.getList(this.agencyId);
} else {
this.agencyId = this.agencyList.keys().next().value;
}
}
/**
......@@ -87,6 +98,7 @@ export class StaffListComponent implements OnInit {
/**
* 編集
* @param data 担当者情報
*/
onClickEdit(data: StaffInfoModel): void {
this.clickEdit.emit(data);
......
......@@ -2,13 +2,18 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { StaffInfoModel } from '../../model/staff-info.model';
import { StaffService } from '../../service/staff.service';
/**
* 担当者登録
*/
@Component({
selector: 'app-staff-regist',
templateUrl: './staff-regist.component.html',
styleUrl: './staff-regist.component.css'
})
export class StaffRegistComponent implements OnInit {
//0:登録、1:更新
@Input() mode = 0;
//担当者情報
@Input() staffInfoModel?: StaffInfoModel;
@Output() clickBack: EventEmitter<void> = new EventEmitter<void>();
......@@ -31,6 +36,7 @@ export class StaffRegistComponent implements OnInit {
/**
* コンストラクタ
* @param staffService 担当者サービス
*/
constructor(private staffService: StaffService) { }
......
<input type="button" class="form-control" style="width:100px;height:38px;line-height: 38px;" data-row="row"
(click)="onClickDenyList()" value="拒否リスト">
\ No newline at end of file
<input type="button" class="form-control" style="width:100px;height:38px;" data-row="row" (click)="onClickDenyList()"
value="拒否リスト">
\ No newline at end of file
<input type="button" class="form-control" style="width:100px;height:38px;line-height: 38px;" data-row="row"
(click)="onClickHistory()" value="乗車履歴">
\ No newline at end of file
<input type="button" class="form-control" style="width:100px;height:38px;" data-row="row" (click)="onClickHistory()"
value="乗車履歴">
\ No newline at end of file
<input type="button" class="form-control" style="width:80px;height:38px;line-height: 38px;" data-row="row"
(click)="onClickPass()" value="定期券">
\ No newline at end of file
<input type="button" class="form-control" style="width:80px;height:38px;" data-row="row" (click)="onClickPass()"
value="定期券">
\ No newline at end of file
import { Component, EventEmitter, Output } from '@angular/core';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { UserInfoModel } from '../../model/user-info.model';
import { ColDef, GridApi } from 'ag-grid-community';
import { HistoryButtonComponent } from './history-button/history-button.component';
import { DenylistButtonComponent } from './denylist-button/denylist-button.component';
import { SizeColumnsToFitGridStrategy, SizeColumnsToFitProvidedWidthStrategy, SizeColumnsToContentStrategy } from 'ag-grid-community'
import { PassRefundService } from '../../service/pass-refund.service';
import { PassButtonComponent } from './pass-button/pass-button.component';
import { UserService } from '../../service/user.service';
import { RoleModel } from '../../model/role.model';
/**
* 利用者検索画面
......@@ -17,6 +17,7 @@ import { UserService } from '../../service/user.service';
styleUrl: './user-list.component.css'
})
export class UserListComponent {
@Input() role?: RoleModel;
@Output() clickPass: EventEmitter<UserInfoModel> = new EventEmitter<UserInfoModel>();
@Output() clickHistory: EventEmitter<UserInfoModel> = new EventEmitter<UserInfoModel>();
@Output() clickDenyList: EventEmitter<UserInfoModel> = new EventEmitter<UserInfoModel>();
......@@ -25,6 +26,7 @@ export class UserListComponent {
userName?: string;
//利用者一覧
userList: UserInfoModel[] = [];
context: any;
private gridApi!: GridApi<UserInfoModel>;
......@@ -33,9 +35,9 @@ export class UserListComponent {
{ headerName: 'フリガナ', field: "nameKana", width: 200 },
{ headerName: 'メールアドレス', field: "email", width: 200 },
{ headerName: '電話番号', field: "phoneNumber", width: 200 },
{ headerName: '', field: "pass", width: 80, cellRenderer: PassButtonComponent },
{ headerName: '', field: "history", width: 80, cellRenderer: HistoryButtonComponent },
{ headerName: '', field: "denyList", width: 80, cellRenderer: DenylistButtonComponent },
{ headerName: '', field: "pass", width: 80, cellRenderer: PassButtonComponent, cellRendererParams: { role: this.role } },
{ headerName: '', field: "history", width: 80, cellRenderer: HistoryButtonComponent, cellRendererParams: { role: this.role } },
{ headerName: '', field: "denyList", width: 80, cellRenderer: DenylistButtonComponent, cellRendererParams: { role: this.role } },
];
public autoSizeStrategy:
| SizeColumnsToFitGridStrategy
......@@ -54,8 +56,9 @@ export class UserListComponent {
/**
* コンストラクタ
* @param userService 利用者サービス
*/
constructor(private userService: UserService, private passRefundService: PassRefundService) {
constructor(private userService: UserService) {
this.context = {
componentParent: this
}
......
/**
* 拒否リスト情報
*/
export class DenyListModel {
//ID
id?: string;
//区間
rideSection?: string;
......
/**
* 売上情報
*/
export class EarningModel {
/**
* 利用者ID
......
/**
* 乗降履歴
*/
export class HistoryModel {
//乗降日時
getonoffDate?: string;
......
......@@ -16,6 +16,8 @@ export class RoleModel {
historyRole = 0;
//拒否リスト(0:閲覧不可、1:自事業所のみ、2:全事業所)
denyListRole = 0;
//売上予定一覧(0:閲覧不可、1:自事業所のみ、2:全事業所)
earningList = 0;
//マスタメンテ(0:不可、1:可)
masterRole = 0;
}
\ No newline at end of file
import { Injectable } from '@angular/core';
import { DenyListModel } from '../model/denylist.model';
/**
* 拒否リストサービス
*/
@Injectable({
providedIn: 'root'
})
......@@ -11,6 +14,7 @@ export class DenyListService {
* @returns 拒否リスト
*/
getList(customerId: string): DenyListModel[] {
//TODO
const denyList: DenyListModel[] = [];
if (customerId) {
for (let i = 0; i < 5; i++) {
......@@ -33,6 +37,7 @@ export class DenyListService {
* @param list 選択拒否リスト
*/
reqDelete(list: DenyListModel[]): void {
//TODO
if (list) {
return;
}
......
import { Injectable } from '@angular/core';
import { EarningModel } from '../model/earning.model';
/**
* トークン売上サービス
*/
@Injectable({
providedIn: 'root'
})
export class EarningListService {
/**
* トークン売上一覧取得
*/
getList(): EarningModel[] {
//TODO
const earningList: EarningModel[] = [];
for (let i = 0; i < 10; i++) {
const model: EarningModel = new EarningModel();
......
import { Injectable } from '@angular/core';
import { HistoryModel } from '../model/history.model';
/**
* 乗降履歴サービス
*/
@Injectable({
providedIn: 'root'
})
......@@ -11,11 +14,12 @@ export class HistoryService {
* @returns 乗降一覧
*/
getList(customerId: string): HistoryModel[] {
//TODO
const historyList: HistoryModel[] = [];
if (customerId) {
for (let i = 0; i < 10; i++) {
const model: HistoryModel = new HistoryModel();
model.getonoffDate = "2024/07/01";
model.getonoffDate = "2024/07/01 17:10:10";
if (i % 2 === 0) {
model.getonoff = "乗車";
model.stopName = "A停留所";
......@@ -29,7 +33,7 @@ export class HistoryService {
historyList.push(model);
}
const model: HistoryModel = new HistoryModel();
model.getonoffDate = "2024/07/01";
model.getonoffDate = "2024/07/01 17:01:01";
model.getonoff = "乗車";
model.stopName = "A停留所";
model.payment = 100;
......@@ -46,6 +50,7 @@ export class HistoryService {
* @param model 乗降履歴情報
*/
changeStatus(model: HistoryModel): void {
//TODO
if (model) {
return;
}
......
import { Injectable } from '@angular/core';
/**
* ログインサービス
*/
@Injectable({
providedIn: 'root'
})
......@@ -11,6 +14,7 @@ export class LoginService {
* @returns 認証成功(true)/失敗(false)
*/
login(email?: string, password?: string): boolean {
//TODO
if (!email) {
alert("メールアドレスが入力されていません");
return false;
......
......@@ -2,13 +2,23 @@ import { Injectable } from '@angular/core';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { PassRefundComponent } from '../menu/pass-list/pass-refund/pass-refund.component';
/**
* 定期券払戻サービス
*/
@Injectable({
providedIn: 'root'
})
export class PassRefundService {
/**
* コンストラクタ
* @param modalService
*/
constructor(private modalService: NgbModal) { }
/**
* ボタン押下
* @returns OK(true)/NO(false)
*/
confirm(): Promise<boolean> {
const modalRef = this.modalService.open(PassRefundComponent);
return modalRef.result.then(() => {
......
import { Injectable } from '@angular/core';
import { PassModel } from '../model/pass.model';
/**
* 定期券サービス
*/
@Injectable({
providedIn: 'root'
})
export class PassService {
/**
* 定期券一覧取得
* @param customerId 利用者ID
* @returns 定期券一覧
*/
getList(customerId: string): PassModel[] {
//TODO
const passList: PassModel[] = [];
if (customerId) {
for (let i = 0; i < 3; i++) {
......@@ -32,6 +40,7 @@ export class PassService {
* @param model 定期券情報
*/
refund(model: PassModel): void {
//TODo
if (model) {
return;
}
......
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { RoleModel } from '../model/role.model';
/**
* 画面遷移サービス
......@@ -8,20 +9,32 @@ import { Router } from '@angular/router';
providedIn: 'root'
})
export class RouteService {
//事業者ID
agencyId?: string;
//権限ID
role?: RoleModel;
/**
* コンストラクタ
* @param router ルーター
*/
constructor(private router: Router) { }
/**
* ログイン画面へ遷移
*/
navigateTop(): void {
this.router.navigate(['top'])
}
/**
* メニューへ遷移
* @param agencyId 事業者ID
* @param role 権限情報
*/
navigateMenu(): void {
navigateMenu(agencyId?: string, role?: RoleModel): void {
this.agencyId = agencyId;
this.role = role;
this.router.navigate(['menu'])
}
}
import { Injectable } from '@angular/core';
import { StaffInfoModel } from '../model/staff-info.model';
/**
* 担当者サービス
*/
@Injectable({
providedIn: 'root'
})
......@@ -11,6 +14,7 @@ export class StaffService {
* @returns 担当者情報一覧
*/
getList(agencyId?: string): StaffInfoModel[] {
//TODO
const staffList: StaffInfoModel[] = [];
if (agencyId) {
for (let i = 0; i < 5; i++) {
......@@ -34,6 +38,7 @@ export class StaffService {
* @returns 事業者一覧
*/
getAgencyList(): Map<string, string> {
//TODO
const agencyList = new Map();
for (let i = 0; i < 5; i++) {
const str = String(i + 1);
......@@ -47,6 +52,7 @@ export class StaffService {
* @returns 権限一覧
*/
getRoleList(): Map<string, string> {
//TODO
const roleList = new Map();
for (let i = 0; i < 3; i++) {
const str = String(i + 1);
......@@ -61,6 +67,7 @@ export class StaffService {
* @param model 担当者情報
*/
regist(model: StaffInfoModel): void {
//TODO
if (model) {
return;
}
......@@ -71,6 +78,7 @@ export class StaffService {
* @param model 担当者情報
*/
update(model: StaffInfoModel): void {
//TODO
if (model) {
return;
}
......@@ -81,6 +89,7 @@ export class StaffService {
* @param emailList メールアドレス
*/
delete(emailList: string[]): void {
//TODO
if (emailList) {
return;
}
......
......@@ -3,14 +3,27 @@ import { StatusUpdateComponent } from '../menu/history-list/status-update/status
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { HistoryModel } from '../model/history.model';
/**
* ステータス更新サービス
*/
@Injectable({
providedIn: 'root'
})
export class StatusUpdateService {
//乗降履歴
model?: HistoryModel;
/**
* コンストラクタ
* @param modalService モーダル
*/
constructor(private modalService: NgbModal) { }
/**
* ボタン押下
* @param model 乗降履歴
* @returns OK(true)/NO(false)
*/
confirm(model: HistoryModel): Promise<boolean> {
this.model = model;
const modalRef = this.modalService.open(StatusUpdateComponent);
......
import { Injectable } from '@angular/core';
import { UserInfoModel } from '../model/user-info.model';
/**
* 利用者サービス
*/
@Injectable({
providedIn: 'root'
})
......@@ -12,6 +15,7 @@ export class UserService {
* @returns 利用者一覧
*/
getList(name?: string): UserInfoModel[] {
//TODO
const userList: UserInfoModel[] = [];
if (name) {
for (let i = 0; i < 10; i++) {
......
import { Component } from '@angular/core';
import { RouteService } from '../service/route.service';
import { LoginService } from '../service/login.service';
import { RoleModel } from '../model/role.model';
/**
* ログイン画面
......@@ -18,6 +19,8 @@ export class TopComponent {
/**
* コンストラクタ
* @param routeService 画面遷移サービス
* @param loginService ログインサービス
*/
constructor(private routeService: RouteService, private loginService: LoginService) { }
......@@ -28,6 +31,16 @@ export class TopComponent {
if (!this.loginService.login(this.email, this.password)) {
return;
}
this.routeService.navigateMenu();
const agencyId = "0001";
const role = new RoleModel();
role.roleId = "1";
role.staffRole = 2;
role.userRole = 2;
role.passRole = 2;
role.historyRole = 2;
role.denyListRole = 2;
role.earningList = 2;
role.masterRole = 2;
this.routeService.navigateMenu(agencyId, role);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment