Updated TimeCardsReporting support
This commit is contained in:
parent
2efd1bcaee
commit
362c542dcb
|
@ -12,6 +12,13 @@ import { RouterModule } from '@angular/router';
|
|||
pageTitle: 'Tables SI',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'timecardsreporting',
|
||||
loadChildren: () => import('./timecardsreporting/timecardsreporting.module').then(m => m.TimeCardsReportingModule),
|
||||
data: {
|
||||
pageTitle: 'TimeCards Reporting',
|
||||
},
|
||||
},
|
||||
]),
|
||||
],
|
||||
})
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<form *ngIf="timeCardsReporting" name="deleteForm" (ngSubmit)="confirmDelete(timeCardsReporting?.id!)">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Confirm delete operation</h4>
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="cancel()">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
|
||||
<p>Are you sure you want to delete this TimeCards Reporting?</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" (click)="cancel()">
|
||||
<fa-icon icon="ban"></fa-icon> <span>Cancel</span>
|
||||
</button>
|
||||
|
||||
<button type="submit" class="btn btn-danger">
|
||||
<fa-icon icon="times"></fa-icon> <span>Delete</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
|
@ -0,0 +1,31 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { JhiEventManager } from 'ng-jhipster';
|
||||
|
||||
import { TimeCardsReporting } from './timecardsreporting.model';
|
||||
import { TimeCardsReportingService } from './timecardsreporting.service';
|
||||
|
||||
@Component({
|
||||
selector: 'jhi-timecardsreporting-delete-dialog',
|
||||
templateUrl: './timecardsreporting-delete-dialog.component.html',
|
||||
})
|
||||
export class TimeCardsReportingDeleteDialogComponent {
|
||||
timeCardsReporting?: TimeCardsReporting;
|
||||
|
||||
constructor(
|
||||
private timeCardsReportingService: TimeCardsReportingService,
|
||||
public activeModal: NgbActiveModal,
|
||||
private eventManager: JhiEventManager
|
||||
) {}
|
||||
|
||||
cancel(): void {
|
||||
this.activeModal.dismiss();
|
||||
}
|
||||
|
||||
confirmDelete(id: string): void {
|
||||
this.timeCardsReportingService.delete(id).subscribe(() => {
|
||||
this.eventManager.broadcast('timeCardsReportingListModification');
|
||||
this.activeModal.close();
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<div *ngIf="timeCardsReporting">
|
||||
<h2>
|
||||
<span>TimeCards Reporting</span> [<b>{{ timeCardsReporting.id }}</b>]
|
||||
</h2>
|
||||
|
||||
<dl class="row-md jh-entity-details">
|
||||
<dt><span>Id</span></dt>
|
||||
<dd>{{ timeCardsReporting.id }}</dd>
|
||||
|
||||
<dt><span>Nome</span></dt>
|
||||
<dd>{{ timeCardsReporting.year }}</dd>
|
||||
|
||||
<dt><span>Operazioni</span></dt>
|
||||
<dd>{{ timeCardsReporting.month }}</dd>
|
||||
|
||||
<dt><span>Id Flusso</span></dt>
|
||||
<dd>{{ timeCardsReporting.idFlusso }}</dd>
|
||||
|
||||
<dt><span>Last Updated</span></dt>
|
||||
<dd>{{ timeCardsReporting.lastUpdate }}</dd>
|
||||
</dl>
|
||||
|
||||
<button type="submit" routerLink="../../" class="btn btn-info">
|
||||
<fa-icon icon="arrow-left"></fa-icon> <span>Back</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,18 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { TimeCardsReporting } from './timecardsreporting.model';
|
||||
|
||||
@Component({
|
||||
selector: 'jhi-timecardsreporting-detail',
|
||||
templateUrl: './timecardsreporting-detail.component.html',
|
||||
})
|
||||
export class TimeCardsReportingDetailComponent implements OnInit {
|
||||
timeCardsReporting: TimeCardsReporting | null = null;
|
||||
|
||||
constructor(private route: ActivatedRoute) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.data.subscribe(({ timeCardsReporting }) => (this.timeCardsReporting = timeCardsReporting));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm">
|
||||
<h2 id="myTimeCardsReportingLabel">
|
||||
Create or edit TimeCards Reporting
|
||||
</h2>
|
||||
|
||||
<div *ngIf="timeCardsReporting">
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
|
||||
<div class="form-group" [hidden]="!timeCardsReporting.id">
|
||||
<label>Id</label>
|
||||
<input type="text" class="form-control" name="id" formControlName="id" readonly>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">Year</label>
|
||||
<input type="text" class="form-control" name="year"
|
||||
formControlName="year">
|
||||
|
||||
<div *ngIf="editForm.get('year')!.invalid && (editForm.get('year')!.dirty || editForm.get('year')!.touched)">
|
||||
<small class="form-text text-danger"
|
||||
*ngIf="editForm.get('year')?.errors?.required">
|
||||
This field is required.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">Month</label>
|
||||
<input type="text" class="form-control" name="month"
|
||||
formControlName="month">
|
||||
|
||||
<div *ngIf="editForm.get('month')!.invalid && (editForm.get('month')!.dirty ||
|
||||
editForm.get('month')!.touched)">
|
||||
<small class="form-text text-danger"
|
||||
*ngIf="editForm.get('month')?.errors?.required">
|
||||
This field is required.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">Id Flusso</label>
|
||||
<input type="text" class="form-control" name="idFlusso"
|
||||
formControlName="idFlusso">
|
||||
|
||||
<div *ngIf="editForm.get('idFlusso')!.invalid && (editForm.get('idFlusso')!.dirty || editForm.get('idFlusso')!.touched)">
|
||||
<small class="form-text text-danger"
|
||||
*ngIf="editForm.get('idFlusso')?.errors?.required">
|
||||
This field is required.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">Last Update</label>
|
||||
<input type="text" class="form-control" name="lastUpdate"
|
||||
formControlName="lastUpdate">
|
||||
|
||||
<div *ngIf="editForm.get('lastUpdate')!.invalid && (editForm.get('lastUpdate')!.dirty || editForm.get('lastUpdate')!.touched)">
|
||||
<small class="form-text text-danger"
|
||||
*ngIf="editForm.get('lastUpdate')?.errors?.required">
|
||||
This field is required.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="timeCardsReporting">
|
||||
<button type="button" class="btn btn-secondary" (click)="previousState()">
|
||||
<fa-icon icon="ban"></fa-icon> <span>Cancel</span>
|
||||
</button>
|
||||
|
||||
<button type="submit" [disabled]="editForm.invalid || isSaving" class="btn btn-primary">
|
||||
<fa-icon icon="save"></fa-icon> <span>Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,80 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { TimeCardsReporting } from './timecardsreporting.model';
|
||||
import { TimeCardsReportingService } from './timecardsreporting.service';
|
||||
|
||||
@Component({
|
||||
selector: 'jhi-timecardsreporting-update',
|
||||
templateUrl: './timecardsreporting-update.component.html',
|
||||
})
|
||||
export class TimeCardsReportingUpdateComponent implements OnInit {
|
||||
timeCardsReporting!: TimeCardsReporting;
|
||||
isSaving = false;
|
||||
|
||||
editForm = this.fb.group({
|
||||
id: [],
|
||||
year: ['', [Validators.required]],
|
||||
month: ['', [Validators.required]],
|
||||
idFlusso: ['', [Validators.required]],
|
||||
lastUpdate: ['', [Validators.required]],
|
||||
});
|
||||
|
||||
constructor(private timeCardsReportingService: TimeCardsReportingService, private route: ActivatedRoute, private fb: FormBuilder) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.data.subscribe(({ timeCardsReporting }) => {
|
||||
if (timeCardsReporting) {
|
||||
this.timeCardsReporting = timeCardsReporting;
|
||||
this.updateForm(timeCardsReporting);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
previousState(): void {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
save(): void {
|
||||
this.isSaving = true;
|
||||
this.updateTimeCardsReporting(this.timeCardsReporting);
|
||||
if (this.timeCardsReporting.id !== undefined) {
|
||||
this.timeCardsReportingService.update(this.timeCardsReporting).subscribe(
|
||||
() => this.onSaveSuccess(),
|
||||
() => this.onSaveError()
|
||||
);
|
||||
} else {
|
||||
this.timeCardsReportingService.create(this.timeCardsReporting).subscribe(
|
||||
() => this.onSaveSuccess(),
|
||||
() => this.onSaveError()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private updateForm(timeCardsReporting: TimeCardsReporting): void {
|
||||
this.editForm.patchValue({
|
||||
id: timeCardsReporting.id,
|
||||
year: timeCardsReporting.year,
|
||||
month: timeCardsReporting.month,
|
||||
idFlusso: timeCardsReporting.idFlusso,
|
||||
lastUpdate: timeCardsReporting.lastUpdate,
|
||||
});
|
||||
}
|
||||
|
||||
private updateTimeCardsReporting(timeCardsReporting: TimeCardsReporting): void {
|
||||
timeCardsReporting.year = this.editForm.get(['year'])!.value;
|
||||
timeCardsReporting.month = this.editForm.get(['month'])!.value;
|
||||
timeCardsReporting.idFlusso = this.editForm.get(['idFlusso'])!.value;
|
||||
timeCardsReporting.lastUpdate = this.editForm.get(['lastUpdate'])!.value;
|
||||
}
|
||||
|
||||
private onSaveSuccess(): void {
|
||||
this.isSaving = false;
|
||||
this.previousState();
|
||||
}
|
||||
|
||||
private onSaveError(): void {
|
||||
this.isSaving = false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
<div>
|
||||
<h2>
|
||||
<span id="timecardsreporting-page-heading">TimeCards Reporting</span>
|
||||
|
||||
<button class="btn btn-primary float-right jh-create-entity"
|
||||
[routerLink]="['./new']">
|
||||
<fa-icon icon="plus"></fa-icon>
|
||||
<span>Create a new TimeCards Reporting</span>
|
||||
</button>
|
||||
</h2>
|
||||
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
|
||||
<jhi-alert></jhi-alert>
|
||||
|
||||
<div class="table-responsive" *ngIf="timecardsreportings">
|
||||
<table class="table table-striped"
|
||||
aria-describedby="user-management-page-heading">
|
||||
<thead>
|
||||
<tr jhiSort [(predicate)]="predicate" [(ascending)]="ascending"
|
||||
[callback]="transition.bind(this)">
|
||||
<th scope="col" jhiSortBy="id"><span>ID</span> <fa-icon
|
||||
icon="sort"></fa-icon></th>
|
||||
<th scope="col"><span>Anno</span></th>
|
||||
<th scope="col"><span>Mese</span></th>
|
||||
<th scope="col"><span>ID Flusso</span></th>
|
||||
<th scope="col"><span>Last Update</span></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody *ngIf="timecardsreportings">
|
||||
<tr *ngFor="let timecardsreporting of timecardsreportings; trackBy: trackIdentity">
|
||||
<td><a [routerLink]="['./', timecardsreporting.id, 'view']">{{ timecardsreporting.id }}</a></td>
|
||||
<td>{{ timecardsreporting.year }}</td>
|
||||
<td>{{ timecardsreporting.month }}</td>
|
||||
<td>{{ timecardsreporting.idFlusso }}</td>
|
||||
<td>{{ timecardsreporting.lastUpdate }}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<button type="submit" [routerLink]="['./', timecardsreporting.id, 'view']"
|
||||
class="btn btn-info btn-sm">
|
||||
<fa-icon icon="eye"></fa-icon>
|
||||
<span class="d-none d-md-inline">View</span>
|
||||
</button>
|
||||
<button type="submit" [routerLink]="['./', timecardsreporting.id, 'edit']"
|
||||
queryParamsHandling="merge" class="btn btn-primary btn-sm">
|
||||
<fa-icon icon="pencil-alt"></fa-icon>
|
||||
<span class="d-none d-md-inline">Edit</span>
|
||||
</button>
|
||||
<button type="button" (click)="deleteTimeCardsReporting(timecardsreporting)"
|
||||
class="btn btn-danger btn-sm">
|
||||
<fa-icon icon="times"></fa-icon>
|
||||
<span class="d-none d-md-inline">Delete</span>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div *ngIf="timecardsreportings">
|
||||
<div class="row justify-content-center">
|
||||
<jhi-item-count [page]="page" [total]="totalItems"
|
||||
[itemsPerPage]="itemsPerPage"></jhi-item-count>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<ngb-pagination [collectionSize]="totalItems" [(page)]="page"
|
||||
[pageSize]="itemsPerPage" [maxSize]="5" [rotate]="true"
|
||||
[boundaryLinks]="true" (pageChange)="transition()"></ngb-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,102 @@
|
|||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { HttpResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { Subscription, combineLatest } from 'rxjs';
|
||||
import { ActivatedRoute, ParamMap, Router, Data } from '@angular/router';
|
||||
import { JhiEventManager } from 'ng-jhipster';
|
||||
|
||||
import { ITEMS_PER_PAGE } from 'app/shared/constants/pagination.constants';
|
||||
// import { AccountService } from 'app/core/auth/account.service';
|
||||
// import { Account } from 'app/core/user/account.model';
|
||||
import { TimeCardsReportingService } from './timecardsreporting.service';
|
||||
import { TimeCardsReporting } from './timecardsreporting.model';
|
||||
import { TimeCardsReportingDeleteDialogComponent } from './timecardsreporting-delete-dialog.component';
|
||||
|
||||
@Component({
|
||||
selector: 'jhi-timecardsreporting',
|
||||
templateUrl: './timecardsreporting.component.html',
|
||||
})
|
||||
export class TimeCardsReportingComponent implements OnInit, OnDestroy {
|
||||
// currentAccount: Account | null = null;
|
||||
timecardsreportings: TimeCardsReporting[] | null = null;
|
||||
timeCardsReportingListSubscription?: Subscription;
|
||||
totalItems = 0;
|
||||
itemsPerPage = ITEMS_PER_PAGE;
|
||||
page!: number;
|
||||
predicate!: string;
|
||||
ascending!: boolean;
|
||||
|
||||
constructor(
|
||||
private timeCardsReportingService: TimeCardsReportingService,
|
||||
// private accountService: AccountService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private eventManager: JhiEventManager,
|
||||
private modalService: NgbModal
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
// this.accountService.identity().subscribe(account => (this.currentAccount = account));
|
||||
this.timeCardsReportingListSubscription = this.eventManager.subscribe('timeCardsReportingListModification', () => this.loadAll());
|
||||
this.handleNavigation();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
if (this.timeCardsReportingListSubscription) {
|
||||
this.eventManager.destroy(this.timeCardsReportingListSubscription);
|
||||
}
|
||||
}
|
||||
|
||||
trackIdentity(index: number, item: TimeCardsReporting): any {
|
||||
return item.id;
|
||||
}
|
||||
|
||||
deleteTimeCardsReporting(timeCardsReporting: TimeCardsReporting): void {
|
||||
const modalRef = this.modalService.open(TimeCardsReportingDeleteDialogComponent, { size: 'lg', backdrop: 'static' });
|
||||
modalRef.componentInstance.timeCardsReporting = timeCardsReporting;
|
||||
}
|
||||
|
||||
transition(): void {
|
||||
this.router.navigate(['./'], {
|
||||
relativeTo: this.activatedRoute.parent,
|
||||
queryParams: {
|
||||
page: this.page,
|
||||
sort: this.predicate + ',' + (this.ascending ? 'asc' : 'desc'),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
private handleNavigation(): void {
|
||||
combineLatest(this.activatedRoute.data, this.activatedRoute.queryParamMap, (data: Data, params: ParamMap) => {
|
||||
const page = params.get('page');
|
||||
this.page = page !== null ? +page : 1;
|
||||
const sort = (params.get('sort') ?? data['defaultSort']).split(',');
|
||||
this.predicate = sort[0];
|
||||
this.ascending = sort[1] === 'asc';
|
||||
this.loadAll();
|
||||
}).subscribe();
|
||||
}
|
||||
|
||||
private loadAll(): void {
|
||||
this.timeCardsReportingService
|
||||
.query({
|
||||
page: this.page - 1,
|
||||
size: this.itemsPerPage,
|
||||
sort: this.sort(),
|
||||
})
|
||||
.subscribe((res: HttpResponse<TimeCardsReporting[]>) => this.onSuccess(res.body, res.headers));
|
||||
}
|
||||
|
||||
private sort(): string[] {
|
||||
const result = [this.predicate + ',' + (this.ascending ? 'asc' : 'desc')];
|
||||
if (this.predicate !== 'id') {
|
||||
result.push('id');
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private onSuccess(timecardsreportings: TimeCardsReporting[] | null, headers: HttpHeaders): void {
|
||||
this.totalItems = Number(headers.get('X-Total-Count'));
|
||||
this.timecardsreportings = timecardsreportings;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
export interface ITimeCardsReporting {
|
||||
id?: any;
|
||||
year?: any;
|
||||
month?: any;
|
||||
idFlusso?: any;
|
||||
lastUpdate?: string;
|
||||
}
|
||||
|
||||
export class TimeCardsReporting implements ITimeCardsReporting {
|
||||
constructor(public id?: any, public year?: any, public month?: any, public idFlusso?: any, public lastUpdate?: string) {}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { EpasmedSharedModule } from 'app/shared/shared.module';
|
||||
import { TimeCardsReportingComponent } from './timecardsreporting.component';
|
||||
import { TimeCardsReportingDetailComponent } from './timecardsreporting-detail.component';
|
||||
import { TimeCardsReportingUpdateComponent } from './timecardsreporting-update.component';
|
||||
import { TimeCardsReportingDeleteDialogComponent } from './timecardsreporting-delete-dialog.component';
|
||||
import { timeCardsReportingRoute } from './timecardsreporting.route';
|
||||
|
||||
@NgModule({
|
||||
imports: [EpasmedSharedModule, RouterModule.forChild(timeCardsReportingRoute)],
|
||||
declarations: [
|
||||
TimeCardsReportingComponent,
|
||||
TimeCardsReportingDetailComponent,
|
||||
TimeCardsReportingUpdateComponent,
|
||||
TimeCardsReportingDeleteDialogComponent,
|
||||
],
|
||||
entryComponents: [TimeCardsReportingComponent],
|
||||
})
|
||||
export class TimeCardsReportingModule {}
|
|
@ -0,0 +1,53 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { Resolve, ActivatedRouteSnapshot, Routes } from '@angular/router';
|
||||
import { Observable, of } from 'rxjs';
|
||||
|
||||
import { TimeCardsReporting, ITimeCardsReporting } from './timecardsreporting.model';
|
||||
import { TimeCardsReportingService } from './timecardsreporting.service';
|
||||
import { TimeCardsReportingComponent } from './timecardsreporting.component';
|
||||
import { TimeCardsReportingDetailComponent } from './timecardsreporting-detail.component';
|
||||
import { TimeCardsReportingUpdateComponent } from './timecardsreporting-update.component';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class TimeCardsReportingResolve implements Resolve<ITimeCardsReporting> {
|
||||
constructor(private service: TimeCardsReportingService) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<ITimeCardsReporting> {
|
||||
const id = route.params['id'];
|
||||
if (id) {
|
||||
return this.service.find(id);
|
||||
}
|
||||
return of(new TimeCardsReporting());
|
||||
}
|
||||
}
|
||||
|
||||
export const timeCardsReportingRoute: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TimeCardsReportingComponent,
|
||||
data: {
|
||||
defaultSort: 'id,asc',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: ':id/view',
|
||||
component: TimeCardsReportingDetailComponent,
|
||||
resolve: {
|
||||
timeCardsReporting: TimeCardsReportingResolve,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'new',
|
||||
component: TimeCardsReportingUpdateComponent,
|
||||
resolve: {
|
||||
timeCardsReporting: TimeCardsReportingResolve,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: ':id/edit',
|
||||
component: TimeCardsReportingUpdateComponent,
|
||||
resolve: {
|
||||
timeCardsReporting: TimeCardsReportingResolve,
|
||||
},
|
||||
},
|
||||
];
|
|
@ -0,0 +1,35 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpResponse } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { SERVER_API_URL } from 'app/app.constants';
|
||||
import { createRequestOption, Pagination } from 'app/shared/util/request-util';
|
||||
import { ITimeCardsReporting } from './timecardsreporting.model';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class TimeCardsReportingService {
|
||||
public resourceUrl = SERVER_API_URL + 'api/timecardsreporting';
|
||||
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
query(req?: Pagination): Observable<HttpResponse<ITimeCardsReporting[]>> {
|
||||
const options = createRequestOption(req);
|
||||
return this.http.get<ITimeCardsReporting[]>(this.resourceUrl, { params: options, observe: 'response' });
|
||||
}
|
||||
|
||||
create(timecardsreporting: ITimeCardsReporting): Observable<ITimeCardsReporting> {
|
||||
return this.http.post<ITimeCardsReporting>(this.resourceUrl, timecardsreporting);
|
||||
}
|
||||
|
||||
update(timecardsreporting: ITimeCardsReporting): Observable<ITimeCardsReporting> {
|
||||
return this.http.put<ITimeCardsReporting>(this.resourceUrl, timecardsreporting);
|
||||
}
|
||||
|
||||
find(id: string): Observable<ITimeCardsReporting> {
|
||||
return this.http.get<ITimeCardsReporting>(`${this.resourceUrl}/${id}`);
|
||||
}
|
||||
|
||||
delete(id: string): Observable<{}> {
|
||||
return this.http.delete(`${this.resourceUrl}/${id}`);
|
||||
}
|
||||
}
|
|
@ -33,6 +33,10 @@
|
|||
<fa-icon icon="user" [fixedWidth]="true"></fa-icon>
|
||||
<span>Tabs SI</span>
|
||||
</a>
|
||||
<a class="dropdown-item" routerLink="entities/timecardsreporting" routerLinkActive="active" (click)="collapseNavbar()">
|
||||
<fa-icon icon="user" [fixedWidth]="true"></fa-icon>
|
||||
<span>TimeCards Reporting</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue