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