@movalib/movalib-commons 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
15
15
  var material_1 = require("@mui/material");
16
16
  var GenderSelector = function (_a) {
17
17
  var handleSelectChange = _a.handleSelectChange, form = _a.form, required = _a.required, sx = _a.sx;
18
- return ((0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({ fullWidth: true, margin: "normal", required: required, sx: __assign({}, sx), error: !form.gender.isValid }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, __assign({ id: "gender-label" }, { children: "Sexe" })), (0, jsx_runtime_1.jsxs)(material_1.Select, __assign({ labelId: "gender-label", id: "gender", name: "gender", label: "Sexe", value: form.gender.value, onChange: function (e) { return handleSelectChange(e); } }, { children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "MALE" }, { children: "Homme" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "FEMALE" }, { children: "Femme" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "OTHER" }, { children: "Autre" }))] })), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: form.gender.error })] })));
18
+ return ((0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({ fullWidth: true, margin: "normal", required: required, sx: __assign({}, sx) }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, __assign({ id: "gender-label" }, { children: "Sexe" })), (0, jsx_runtime_1.jsxs)(material_1.Select, __assign({ labelId: "gender-label", id: "gender", name: "gender", label: "Sexe", value: form.gender.value, onChange: function (e) { return handleSelectChange(e); } }, { children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "MALE" }, { children: "Homme" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "FEMALE" }, { children: "Femme" })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, __assign({ value: "OTHER" }, { children: "Autre" }))] })), (0, jsx_runtime_1.jsx)(material_1.FormHelperText, { children: form.gender.error })] })));
19
19
  };
20
20
  exports.default = GenderSelector;
@@ -1,15 +1,16 @@
1
1
  import { DocumentState, DocumentType } from "../helpers/Enums";
2
2
  export default class Document {
3
3
  id: string;
4
+ ownerId: number;
4
5
  state: DocumentState;
5
6
  fileName: string;
6
7
  originalFileName: string;
7
8
  fileType: string;
8
9
  fileSignedUrl: string;
9
10
  type: DocumentType;
10
- creationDate: Date;
11
+ creationDate?: Date;
11
12
  updateDate?: Date;
12
13
  reference?: string;
13
- constructor(id: string, state: DocumentState, fileName: string, originalFileName: string, fileType: string, fileSignedUrl: string, name: string, type: DocumentType, creationDate: Date, updateDate?: Date, reference?: string);
14
+ constructor(id: string, ownerId: number, state: DocumentState, fileName: string, originalFileName: string, fileType: string, fileSignedUrl: string, type: DocumentType, creationDate?: Date, updateDate?: Date, reference?: string);
14
15
  static findByTypeAndReference(documents: Document[], type: DocumentType, reference: string): Document | undefined;
15
16
  }
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var Document = /** @class */ (function () {
4
- function Document(id, state, fileName, originalFileName, fileType, fileSignedUrl, name, type, creationDate, updateDate, reference) {
4
+ function Document(id, ownerId, state, fileName, originalFileName, fileType, fileSignedUrl, type, creationDate, updateDate, reference) {
5
5
  this.id = id;
6
6
  this.state = state;
7
+ this.ownerId = ownerId;
7
8
  this.fileName = fileName;
8
9
  this.originalFileName = originalFileName;
9
10
  this.fileType = fileType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "Bibliothèque d'objets communs à l'ensemble des projets React de Movalib",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@ interface GenderSelectorProps {
13
13
 
14
14
  const GenderSelector: React.FC<GenderSelectorProps> = ({ handleSelectChange, form, required, sx }) => {
15
15
  return (
16
- <FormControl fullWidth margin="normal" required={required} sx={{ ...sx }} error={!form.gender.isValid}>
16
+ <FormControl fullWidth margin="normal" required={required} sx={{ ...sx }} >
17
17
  <InputLabel id="gender-label">Sexe</InputLabel>
18
18
  <Select
19
19
  labelId="gender-label"
@@ -4,31 +4,33 @@ export default class Document {
4
4
 
5
5
  //Properties
6
6
  id: string; // UUID
7
+ ownerId: number;
7
8
  state: DocumentState;
8
9
  fileName: string;
9
10
  originalFileName: string;
10
11
  fileType: string;
11
12
  fileSignedUrl: string;
12
13
  type: DocumentType;
13
- creationDate: Date;
14
+ creationDate?: Date;
14
15
  updateDate?: Date;
15
16
  reference?: string;
16
17
 
17
18
  constructor(
18
19
  id: string,
20
+ ownerId: number,
19
21
  state: DocumentState,
20
22
  fileName: string,
21
23
  originalFileName: string,
22
24
  fileType: string,
23
25
  fileSignedUrl: string,
24
- name: string,
25
26
  type: DocumentType,
26
- creationDate: Date,
27
+ creationDate?: Date,
27
28
  updateDate?: Date,
28
29
  reference?: string
29
30
  ) {
30
31
  this.id = id;
31
32
  this.state = state;
33
+ this.ownerId = ownerId;
32
34
  this.fileName = fileName;
33
35
  this.originalFileName = originalFileName;
34
36
  this.fileType = fileType;