Providers & Contact fini
This commit is contained in:
@@ -7,6 +7,7 @@ import { registerLocaleData } from '@angular/common';
|
||||
import fr from '@angular/common/locales/fr';
|
||||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import {NzModalService} from 'ng-zorro-antd/modal';
|
||||
|
||||
registerLocaleData(fr);
|
||||
|
||||
@@ -14,6 +15,7 @@ export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideBrowserGlobalErrorListeners(),
|
||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||
provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient()
|
||||
provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient(),
|
||||
NzModalService
|
||||
]
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ export class ContactCard {
|
||||
}
|
||||
|
||||
try {
|
||||
const contact = await firstValueFrom(this.contactsService.updateContactRequest(this.contact().id,contactValue));
|
||||
const contact = await firstValueFrom(this.contactsService.updateContactEndpoint(this.contact().id,contactValue));
|
||||
this.contactEdit.set(contact);
|
||||
console.log(contact);
|
||||
this.contactForm.reset();
|
||||
|
||||
@@ -35,7 +35,7 @@ export class Contact {
|
||||
async fetchCustomers() {
|
||||
this.contactsLoading.set(true);
|
||||
try {
|
||||
const contacts = await firstValueFrom(this.contactsService.getAllContactxuest())
|
||||
const contacts = await firstValueFrom(this.contactsService.getAllContactEndpoint())
|
||||
this.contacts.set(contacts)
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
|
||||
@@ -2,7 +2,6 @@ import {Component, output} from '@angular/core';
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {NzButtonModule} from "ng-zorro-antd/button";
|
||||
import {NzModalModule} from "ng-zorro-antd/modal";
|
||||
import {ProvidersAddForm} from "../../providers/providers-add-form/providers-add-form";
|
||||
import {CustomersAddForm} from "../customers-add-form/customers-add-form";
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -17,7 +17,7 @@ import {ProvidersAddForm} from "../providers-add-form/providers-add-form";
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()">
|
||||
<ng-template #modalTitle style="text-align: center">Création de clients</ng-template>
|
||||
<ng-template #modalTitle style="text-align: center">Création de prestataires</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
<app-providers-add-form/>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="providerForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Note</nz-form-label>
|
||||
<nz-form-label nzSpan="5" nzRequired>Prix</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Note" formControlName="note">
|
||||
<input nz-input placeholder="Prix" formControlName="price">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
|
||||
@@ -6,48 +6,29 @@ import {NzFlexDirective} from "ng-zorro-antd/flex";
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
|
||||
import {
|
||||
CreateCustomerDto,
|
||||
CustomersService,
|
||||
CustomertypesService,
|
||||
GetCustomerTypeDto,
|
||||
ProvidersService, ProvidertypesService
|
||||
} from "../../../services/api";
|
||||
import {CreateProviderDto, GetProviderTypeDto, ProvidertypesService, ServiceprovidersService} from "../../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers-add-form',
|
||||
imports: [
|
||||
FormsModule,
|
||||
NzButtonComponent,
|
||||
NzColDirective,
|
||||
NzFlexDirective,
|
||||
NzFormControlComponent,
|
||||
NzFormDirective,
|
||||
NzFormItemComponent,
|
||||
NzFormLabelComponent,
|
||||
NzInputDirective,
|
||||
NzOptionComponent,
|
||||
NzRowDirective,
|
||||
NzSelectComponent,
|
||||
ReactiveFormsModule
|
||||
imports: [FormsModule, NzButtonComponent, NzColDirective, NzFlexDirective, NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent, NzInputDirective, NzOptionComponent, NzRowDirective, NzSelectComponent, ReactiveFormsModule
|
||||
],
|
||||
templateUrl: './providers-add-form.html',
|
||||
styleUrl: './providers-add-form.css',
|
||||
})
|
||||
export class ProvidersAddForm {
|
||||
private providersService = inject(ProvidersService);
|
||||
private providertypesService = inject(ProvidertypesService);
|
||||
private providersService = inject(ServiceprovidersService);
|
||||
private serviceprovidertypesService = inject(ProvidertypesService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
|
||||
providerForm = new FormGroup({
|
||||
Price: new FormControl<string>(null, [Validators.required]),
|
||||
Price: new FormControl<number>(null, [Validators.required]),
|
||||
providerTypeId: new FormControl<number>(null, [Validators.required]),
|
||||
})
|
||||
|
||||
providerPost = signal<CreateCustomerDto>(this.providerForm.value);
|
||||
providerPost = signal<CreateProviderDto>(this.providerForm.value);
|
||||
providersLoading = signal<boolean>(false);
|
||||
|
||||
async submitForm() {
|
||||
@@ -58,16 +39,16 @@ export class ProvidersAddForm {
|
||||
console.log(this.providerForm.getRawValue())
|
||||
this.providerPost.set(this.providerForm.getRawValue())
|
||||
|
||||
await this.createCustomers(this.providerPost().note, this.providerPost().customerTypeId)
|
||||
await this.createProviders(this.providerPost().price, this.providerPost().providerTypeId)
|
||||
// Pour vider le formulaire
|
||||
this.providerForm.reset()
|
||||
}
|
||||
|
||||
async createCustomers(note: string, customerTypeId: number) {
|
||||
async createProviders(price: number, customerTypeId: number) {
|
||||
this.providersLoading.set(true);
|
||||
|
||||
const providerValue = {
|
||||
note: note,
|
||||
price: price,
|
||||
customerTypeId: customerTypeId
|
||||
}
|
||||
|
||||
@@ -85,21 +66,21 @@ export class ProvidersAddForm {
|
||||
this.providersLoading.set(false);
|
||||
}
|
||||
|
||||
customerTypes = signal<GetCustomerTypeDto[]>([])
|
||||
providerTypes = signal<GetProviderTypeDto[]>([])
|
||||
|
||||
async ngOnInit() {
|
||||
await this.fetchCustomerTypes()
|
||||
}
|
||||
|
||||
async fetchCustomerTypes() {
|
||||
this.customersLoading.set(true);
|
||||
this.providersLoading.set(true);
|
||||
try {
|
||||
const customerType = await firstValueFrom(this.customertypesService.getAllCustomerTypeEndpoint())
|
||||
this.customerTypes.set(customerType)
|
||||
const providerType = await firstValueFrom(this.serviceprovidertypesService.getAllProviderTypesEndpoint())
|
||||
this.providerTypes.set(providerType)
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.customersLoading.set(false);
|
||||
this.providersLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,29 @@
|
||||
<p>providers-card works!</p>
|
||||
@if (edit() == false) {
|
||||
<nz-card style="width:400px;" [nzActions]="[edit, delete]">
|
||||
<h2 style="text-align: center; font-weight: bold">Prestataire n°{{ provider().id }}</h2>
|
||||
<p>Prix : {{ provider().price }}</p>
|
||||
</nz-card>
|
||||
<ng-template #edit>
|
||||
<nz-icon (click)="Edit()" nzType="edit" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #delete>
|
||||
<nz-icon (click)="Delete()" nzType="delete" nzTheme="fill" />
|
||||
</ng-template>
|
||||
} @else {
|
||||
<nz-card style="width:400px;" [nzActions]="[back, check]">
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="providerForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Prix </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Nom" formControlName="note">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</form>
|
||||
</nz-card>
|
||||
<ng-template #back>
|
||||
<nz-icon (click)="Back()" nzType="backward" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #check>
|
||||
<nz-icon (click)="submitForm()" nzType="check" nzTheme="outline" />
|
||||
</ng-template>
|
||||
}
|
||||
|
||||
@@ -1,11 +1,96 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {Component, inject, input, output, signal} from '@angular/core';
|
||||
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzCardComponent} from "ng-zorro-antd/card";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {
|
||||
CustomersService,
|
||||
GetCustomerDto, GetProviderDto,
|
||||
ServiceprovidersService,
|
||||
UpdateCustomerDto,
|
||||
UpdateProviderDto
|
||||
} from "../../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers-card',
|
||||
imports: [],
|
||||
imports: [FormsModule, NzCardComponent, NzColDirective, NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent, NzIconDirective, NzInputDirective, NzRowDirective, ReactiveFormsModule],
|
||||
templateUrl: './providers-card.html',
|
||||
styleUrl: './providers-card.css',
|
||||
})
|
||||
export class ProvidersCard {
|
||||
private providersService = inject(ServiceprovidersService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
providerEdit = signal<UpdateProviderDto>(null);
|
||||
providersLoading = signal<boolean>(false);
|
||||
|
||||
providerForm = new FormGroup({
|
||||
id: new FormControl(null, [Validators.required]),
|
||||
price: new FormControl<number>(null, [Validators.required]),
|
||||
})
|
||||
|
||||
async submitForm() {
|
||||
this.providersLoading.set(true);
|
||||
|
||||
const providerValue = {
|
||||
price: this.providerForm.value.price,
|
||||
}
|
||||
|
||||
try {
|
||||
const provider = await firstValueFrom(this.providersService.updateProviderEndpoint(this.provider().id,providerValue));
|
||||
this.providerEdit.set(provider);
|
||||
console.log(provider);
|
||||
this.providerForm.reset();
|
||||
this.edit.set(false);
|
||||
|
||||
this.triggerEdited.emit();
|
||||
|
||||
} catch (e)
|
||||
{
|
||||
this.notificationService.error('Erreur', ' (ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.providersLoading.set(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
provider = input<GetProviderDto>(null);
|
||||
|
||||
edit = signal(false)
|
||||
|
||||
triggerEdited = output<void>();
|
||||
|
||||
protected Edit() {
|
||||
this.edit.set(true)
|
||||
}
|
||||
|
||||
protected Back() {
|
||||
this.edit.set(false)
|
||||
this.providerForm.reset();
|
||||
}
|
||||
|
||||
async Delete() {
|
||||
this.providersLoading.set(true);
|
||||
|
||||
try {
|
||||
const provider = await firstValueFrom(this.providersService.deleteProviderEndpoint(this.provider().id));
|
||||
this.providerEdit.set(provider);
|
||||
|
||||
this.providerForm.reset();
|
||||
this.triggerEdited.emit();
|
||||
|
||||
} catch (e)
|
||||
{
|
||||
this.notificationService.error('Erreur de recherche', "L\'auteur n\'existe pas !");
|
||||
|
||||
this.notificationService.error('Erreur', ' (ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.providersLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {GetProviderDto, ProvidersService} from "../../services/api";
|
||||
import {GetProviderDto, ServiceprovidersService} from "../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {Router} from "@angular/router";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
@@ -14,7 +14,7 @@ import {CreateProvidersModal} from "./create-providers-modal/create-providers-mo
|
||||
styleUrl: './providers.css',
|
||||
})
|
||||
export class Providers {
|
||||
private providersService = inject(ProvidersService);
|
||||
private providersService = inject(ServiceprovidersService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
router = inject(Router);
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="staffForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Nom </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Nom" formControlName="lastName">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Prénom</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Prénom" formControlName="firstName">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Téléphone</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Numéro de téléphone" formControlName="phoneNumber">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Email</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Email" formControlName="email">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Adresse</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Adresse" formControlName="address">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Rôle</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Rôle" formControlName="role">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-layout></nz-layout>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="10" nzRequired>Numéro F4T2</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Numéro F4T2" formControlName="F4T2NumberApproval">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="10" nzRequired>Date d'expiration du F4T2</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Date d'expiration du F4T2" formControlName="F4T2ExpirationDate">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
|
||||
</form>
|
||||
@@ -1,43 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {
|
||||
NzFormControlComponent,
|
||||
NzFormDirective,
|
||||
NzFormItemComponent,
|
||||
NzFormLabelComponent,
|
||||
NzFormModule
|
||||
} from "ng-zorro-antd/form";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {NzLayoutComponent} from "ng-zorro-antd/layout";
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff-add-form',
|
||||
imports: [ReactiveFormsModule, NzFormModule, NzInputDirective, NzLayoutComponent],
|
||||
templateUrl: './staff-add-form.html',
|
||||
styleUrl: './staff-add-form.css',
|
||||
})
|
||||
export class StaffAddForm {
|
||||
staffForm = new FormGroup({
|
||||
lastName: new FormControl<string>(null, [Validators.required]),
|
||||
firstName: new FormControl<string>(null, [Validators.required]),
|
||||
phoneNumber: new FormControl<string>(null, [Validators.required]),
|
||||
email: new FormControl<string>(null, [Validators.required]),
|
||||
address: new FormControl<string>(null, [Validators.required]),
|
||||
role: new FormControl<string>(null, [Validators.required]),
|
||||
price: new FormControl<string>(null, [Validators.required]),
|
||||
F4T2NumberApproval: new FormControl<string>(null, [Validators.required]),
|
||||
F4T2ExpirationDate: new FormControl<Date>(null, [Validators.required]),
|
||||
|
||||
})
|
||||
submitForm() {
|
||||
// Pour annuler si le formulaire est invalide
|
||||
if (this.staffForm.invalid) return;
|
||||
|
||||
// Pour obtenir la valeur du formulaire
|
||||
console.log(this.staffForm.getRawValue())
|
||||
|
||||
// Pour vider le formulaire
|
||||
this.staffForm.reset()
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>staff-card-form works!</p>
|
||||
@@ -1,57 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {StaffAddForm} from "../staff-add-form/staff-add-form";
|
||||
import {NzButtonModule} from "ng-zorro-antd/button";
|
||||
import {NzModalModule} from "ng-zorro-antd/modal";
|
||||
import {ProvidersAddForm} from "../../providers/providers-add-form/providers-add-form";
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff-card-form',
|
||||
imports: [NzButtonModule, NzModalModule, StaffAddForm],
|
||||
template: `
|
||||
<button nz-button nzType="primary" (click)="showModal()">
|
||||
<span style="font-weight: bold">+</span>
|
||||
</button>
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
[nzTitle]="modalTitle"
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()"
|
||||
>
|
||||
<ng-template #modalTitle style="text-align: center">Création de artificiers</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
<app-staff-add-form/>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #modalFooter>
|
||||
<button nz-button nzType="default" (click)="handleCancel()">Annuler</button>
|
||||
<button nz-button nzType="primary" (click)="handleOk()" [nzLoading]="isConfirmLoading">Confirmer</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
`,
|
||||
styleUrl: './staff-card-form.css',
|
||||
})
|
||||
export class StaffCardForm {
|
||||
constructor(private message: NzMessageService) {}
|
||||
isVisible = false;
|
||||
isConfirmLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isConfirmLoading = true;
|
||||
this.message.success('Prestataire créé !');
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isConfirmLoading = false;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>staff-get-all works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff-get-all',
|
||||
imports: [],
|
||||
templateUrl: './staff-get-all.html',
|
||||
styleUrl: './staff-get-all.css',
|
||||
})
|
||||
export class StaffGetAll {
|
||||
|
||||
}
|
||||
@@ -1,3 +1 @@
|
||||
<app-staff-card-form/>
|
||||
|
||||
<app-staff-get-all/>
|
||||
<p>staff<p>
|
||||
|
||||
@@ -11,9 +11,8 @@ api/customers.service.ts
|
||||
api/customertypes.service.ts
|
||||
api/experiencelevels.service.ts
|
||||
api/historyofapprovals.service.ts
|
||||
api/providers.service.ts
|
||||
api/providertype.service.ts
|
||||
api/providertypes.service.ts
|
||||
api/serviceproviders.service.ts
|
||||
api/staffs.service.ts
|
||||
configuration.ts
|
||||
encoder.ts
|
||||
|
||||
@@ -12,12 +12,10 @@ export * from './experiencelevels.service';
|
||||
import { ExperiencelevelsService } from './experiencelevels.service';
|
||||
export * from './historyofapprovals.service';
|
||||
import { HistoryofapprovalsService } from './historyofapprovals.service';
|
||||
export * from './providers.service';
|
||||
import { ProvidersService } from './providers.service';
|
||||
export * from './providertype.service';
|
||||
import { ProvidertypeService } from './providertype.service';
|
||||
export * from './providertypes.service';
|
||||
import { ProvidertypesService } from './providertypes.service';
|
||||
export * from './serviceproviders.service';
|
||||
import { ServiceprovidersService } from './serviceproviders.service';
|
||||
export * from './staffs.service';
|
||||
import { StaffsService } from './staffs.service';
|
||||
export const APIS = [AvailabilitiesService, CommunicationsService, ContactsService, CustomersService, CustomertypesService, ExperiencelevelsService, HistoryofapprovalsService, ProvidersService, ProvidertypeService, ProvidertypesService, StaffsService];
|
||||
export const APIS = [AvailabilitiesService, CommunicationsService, ContactsService, CustomersService, CustomertypesService, ExperiencelevelsService, HistoryofapprovalsService, ProvidertypesService, ServiceprovidersService, StaffsService];
|
||||
|
||||
@@ -162,10 +162,10 @@ export class ContactsService extends BaseService {
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getAllContactxuest(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetContactDto>>;
|
||||
public getAllContactxuest(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetContactDto>>>;
|
||||
public getAllContactxuest(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetContactDto>>>;
|
||||
public getAllContactxuest(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
public getAllContactEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetContactDto>>;
|
||||
public getAllContactEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetContactDto>>>;
|
||||
public getAllContactEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetContactDto>>>;
|
||||
public getAllContactEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
@@ -268,15 +268,15 @@ export class ContactsService extends BaseService {
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public updateContactRequest(id: number, updateContactDto: UpdateContactDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetContactDto>;
|
||||
public updateContactRequest(id: number, updateContactDto: UpdateContactDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetContactDto>>;
|
||||
public updateContactRequest(id: number, updateContactDto: UpdateContactDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetContactDto>>;
|
||||
public updateContactRequest(id: number, updateContactDto: UpdateContactDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
public updateContactEndpoint(id: number, updateContactDto: UpdateContactDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetContactDto>;
|
||||
public updateContactEndpoint(id: number, updateContactDto: UpdateContactDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetContactDto>>;
|
||||
public updateContactEndpoint(id: number, updateContactDto: UpdateContactDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetContactDto>>;
|
||||
public updateContactEndpoint(id: number, updateContactDto: UpdateContactDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling updateContactRequest.');
|
||||
throw new Error('Required parameter id was null or undefined when calling updateContactEndpoint.');
|
||||
}
|
||||
if (updateContactDto === null || updateContactDto === undefined) {
|
||||
throw new Error('Required parameter updateContactDto was null or undefined when calling updateContactRequest.');
|
||||
throw new Error('Required parameter updateContactDto was null or undefined when calling updateContactEndpoint.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
|
||||
} from '@angular/common/http';
|
||||
import { CustomHttpParameterCodec } from '../encoder';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
// @ts-ignore
|
||||
import { GetProviderTypeDto } from '../model/get-provider-type-dto';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
import { BaseService } from '../api.base.service';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProvidertypeService extends BaseService {
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providertype
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getAllProviderTypesEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetProviderTypeDto>>;
|
||||
public getAllProviderTypesEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetProviderTypeDto>>>;
|
||||
public getAllProviderTypesEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetProviderTypeDto>>>;
|
||||
public getAllProviderTypesEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providertype`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Array<GetProviderTypeDto>>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -157,6 +157,56 @@ export class ProvidertypesService extends BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providertypes
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getAllProviderTypesEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetProviderTypeDto>>;
|
||||
public getAllProviderTypesEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetProviderTypeDto>>>;
|
||||
public getAllProviderTypesEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetProviderTypeDto>>>;
|
||||
public getAllProviderTypesEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providertypes`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Array<GetProviderTypeDto>>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providertypes/{id}
|
||||
* @param id
|
||||
|
||||
+11
-11
@@ -33,14 +33,14 @@ import { BaseService } from '../api.base.service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProvidersService extends BaseService {
|
||||
export class ServiceprovidersService extends BaseService {
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint post /API/providers
|
||||
* @endpoint post /API/serviceproviders
|
||||
* @param createProviderDto
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
@@ -87,7 +87,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers`;
|
||||
let localVarPath = `/API/serviceproviders`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetProviderDto>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -104,7 +104,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint delete /API/providers/{id}
|
||||
* @endpoint delete /API/serviceproviders/{id}
|
||||
* @param id
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
@@ -142,7 +142,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
let localVarPath = `/API/serviceproviders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetProviderDto>('delete', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -158,7 +158,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providers
|
||||
* @endpoint get /API/serviceproviders
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
@@ -192,7 +192,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers`;
|
||||
let localVarPath = `/API/serviceproviders`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Array<GetProviderDto>>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -208,7 +208,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providers/{id}
|
||||
* @endpoint get /API/serviceproviders/{id}
|
||||
* @param id
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
@@ -246,7 +246,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
let localVarPath = `/API/serviceproviders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetProviderDto>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -262,7 +262,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint put /API/providers/{id}
|
||||
* @endpoint put /API/serviceproviders/{id}
|
||||
* @param id
|
||||
* @param updateProviderDto
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
@@ -313,7 +313,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
let localVarPath = `/API/serviceproviders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetProviderDto>('put', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -11,5 +11,6 @@
|
||||
|
||||
export interface CreateProviderDto {
|
||||
price?: number;
|
||||
providerTypeId?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
|
||||
|
||||
export interface CreateStaffDto {
|
||||
firstName?: string | null;
|
||||
lastName?: string | null;
|
||||
profession?: string | null;
|
||||
email?: string | null;
|
||||
f4T2NumberApproval?: string | null;
|
||||
f4T2ExpirationDate?: string;
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
export interface GetProviderDto {
|
||||
id?: number;
|
||||
price?: number;
|
||||
providerTypeId?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
|
||||
export interface GetStaffDto {
|
||||
id?: number;
|
||||
firstName?: string | null;
|
||||
lastName?: string | null;
|
||||
profession?: string | null;
|
||||
email?: string | null;
|
||||
f4T2NumberApproval?: string | null;
|
||||
f4T2ExpirationDate?: string;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ export const MethodImplAttributes = {
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2,
|
||||
NUMBER_3: 3,
|
||||
NUMBER_32: 3,
|
||||
NUMBER_4: 4,
|
||||
NUMBER_42: 4,
|
||||
NUMBER_8: 8,
|
||||
|
||||
Reference in New Issue
Block a user