Skip to content
Snippets Groups Projects
Commit 0888b574 authored by Hugo NOUTS's avatar Hugo NOUTS
Browse files

fix(structure-dto): free workshop are no longer required

Type also changed from boolean to string
parent 824f3a18
No related branches found
No related tags found
2 merge requests!272V2.1.3,!271🐛 freeworkshop no longer mandatory to create a structure
......@@ -48,9 +48,7 @@ export class StructureDto {
@IsNotEmpty()
categories: any;
@ApiProperty({ required: true })
@IsNotEmpty()
freeWorkShop: boolean | string;
freeWorkShop: string;
@ApiProperty({ required: true })
@IsNotEmpty()
......
......@@ -105,7 +105,6 @@ export class Structure {
categories: StructureCategories;
@Prop()
@IsNotEmpty()
/** 'Oui' | 'Oui sous condition' | 'Non' */
freeWorkShop: string;
......
......@@ -60,7 +60,7 @@ const structuresSearchServiceMock = {
publics: ['toutPublic'],
labelsQualifications: ['passNumerique', 'espacePublicNumeriqueepn'],
accessModality: ['accesLibre', 'telephoneVisio', 'surRdv'],
freeWorkShop: false,
freeWorkShop: 'Non',
createdAt: '2020-11-16T09:30:00.000Z',
updatedAt: '2021-04-12T08:48:00.000Z',
structureName: "L'Atelier Numérique",
......@@ -309,7 +309,7 @@ describe('StructuresService', () => {
publics: ['toutPublic'],
labelsQualifications: ['passNumerique', 'espacePublicNumeriqueepn'],
accessModality: ['accesLibre', 'telephoneVisio', 'surRdv'],
freeWorkShop: false,
freeWorkShop: 'Non',
createdAt: '2020-11-16T09:30:00.000Z',
updatedAt: '2021-04-12T08:48:00.000Z',
structureName: "L'Atelier Numérique",
......
......@@ -66,7 +66,7 @@ export const structuresDocumentDataMock: StructureDocument[] = [
nbTablets: 1,
nbNumericTerminal: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
personalOffers: [],
createdAt: '2021-05-06T09:42:38.000Z',
......@@ -143,7 +143,7 @@ export const structuresDocumentDataMock: StructureDocument[] = [
nbTablets: 1,
nbNumericTerminal: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
personalOffers: [
{
......@@ -226,7 +226,7 @@ export const structureMockDto: StructureDto = {
nbComputers: 1,
nbPrinters: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
personalOffers: [],
createdAt: new Date(),
......
......@@ -103,7 +103,7 @@ export class StructuresServiceMock {
nbComputers: 1,
nbPrinters: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
createdAt: new Date('2021-05-06T09:42:38.000Z'),
updatedAt: new Date('2021-05-06T09:42:38.000Z'),
......@@ -154,7 +154,7 @@ export class StructuresServiceMock {
handicaps: ['physicalDisability'],
publicOthers: ['uniquementFemmes'],
},
freeWorkShop: false,
freeWorkShop: 'Non',
createdAt: new Date('2020-11-16T09:30:00.000Z'),
updatedAt: new Date('2020-11-16T09:30:00.000Z'),
structureName: "L'Atelier Numérique",
......@@ -309,7 +309,7 @@ export class StructuresServiceMock {
handicaps: ['physicalDisability'],
publicOthers: ['uniquementFemmes'],
},
freeWorkShop: false,
freeWorkShop: 'Non',
createdAt: new Date('2020-11-16T09:30:00.000Z'),
updatedAt: new Date('2020-11-16T09:30:00.000Z'),
structureName: "L'Atelier Numérique",
......@@ -518,7 +518,7 @@ export class StructuresServiceMock {
nbComputers: 1,
nbPrinters: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
createdAt: new Date('2021-05-06T09:42:38.000Z'),
updatedAt: new Date('2021-05-06T09:42:50.000Z'),
......@@ -620,7 +620,7 @@ export class StructuresServiceMock {
nbComputers: 1,
nbPrinters: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
createdAt: new Date('2021-05-06T09:42:38.000Z'),
updatedAt: new Date('2021-05-06T09:42:50.000Z'),
......@@ -727,7 +727,7 @@ export class StructuresServiceMock {
nbComputers: 1,
nbPrinters: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
createdAt: new Date('2021-05-06T09:42:38.000Z'),
updatedAt: new Date('2021-05-06T09:42:50.000Z'),
......@@ -829,7 +829,7 @@ export class StructuresServiceMock {
nbComputers: 1,
nbPrinters: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
createdAt: new Date('2021-05-06T09:42:38.000Z'),
updatedAt: new Date('2021-05-06T09:42:50.000Z'),
......@@ -936,7 +936,7 @@ export class StructuresServiceMock {
nbComputers: 1,
nbPrinters: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
personalOffers: [],
dataShareConsentDate: '2022-03-01T09:00:00.000Z',
......@@ -1040,7 +1040,7 @@ export class StructuresServiceMock {
nbComputers: 1,
nbPrinters: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
personalOffers: [],
dataShareConsentDate: '2022-03-01T09:00:00.000Z',
......@@ -1121,7 +1121,7 @@ export class StructuresServiceMock {
nbTablets: 1,
nbNumericTerminal: 1,
nbScanners: 1,
freeWorkShop: false,
freeWorkShop: 'Non',
accountVerified: true,
createdAt: new Date('2021-05-06T09:42:38.000Z'),
updatedAt: new Date('2021-05-06T09:42:50.000Z'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment