@movalib/movalib-commons 1.63.0 → 1.63.4

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.
@@ -32,7 +32,7 @@ var VehiclePlateField = function (_a) {
32
32
  var _c = (0, react_1.useState)(false), error = _c[0], setError = _c[1];
33
33
  var _d = (0, react_1.useState)(0), lastLength = _d[0], setLastLength = _d[1]; // Ajout d'un état pour stocker la longueur précédente
34
34
  var _e = (0, react_1.useState)(''), helperText = _e[0], setHelperText = _e[1];
35
- var MIN_FOREIGN_PLATE_LENGTH = 6;
35
+ var MIN_FOREIGN_PLATE_LENGTH = 3;
36
36
  // Hook de validation de la plaque
37
37
  (0, react_1.useEffect)(function () {
38
38
  if (country === 'FR') {
@@ -27,8 +27,9 @@ export default class Customer extends User {
27
27
  notes: string;
28
28
  billingAddress?: Address;
29
29
  siren?: string;
30
+ vatId?: string;
30
31
  constructor(id: string, roles: Role[] | undefined, firstname: string | undefined, lastname: string | undefined, avatar: string | undefined, addresses: Address[] | undefined, vehicles: Vehicle[], email: string | undefined, turnover: {
31
32
  key: string;
32
33
  value: number;
33
- }[], type: CustomerType, companyName: string, companyPhoneNumber: string, billingAddress: Address | undefined, notes: string, siren?: string);
34
+ }[], type: CustomerType, companyName: string, companyPhoneNumber: string, billingAddress: Address | undefined, notes: string, siren?: string, vatId?: string);
34
35
  }
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  var User_1 = __importDefault(require("./User"));
22
22
  var Customer = /** @class */ (function (_super) {
23
23
  __extends(Customer, _super);
24
- function Customer(id, roles, firstname, lastname, avatar, addresses, vehicles, email, turnover, type, companyName, companyPhoneNumber, billingAddress, notes, siren) {
24
+ function Customer(id, roles, firstname, lastname, avatar, addresses, vehicles, email, turnover, type, companyName, companyPhoneNumber, billingAddress, notes, siren, vatId) {
25
25
  if (roles === void 0) { roles = []; }
26
26
  if (firstname === void 0) { firstname = ""; }
27
27
  if (lastname === void 0) { lastname = ""; }
@@ -30,6 +30,7 @@ var Customer = /** @class */ (function (_super) {
30
30
  if (email === void 0) { email = ""; }
31
31
  if (billingAddress === void 0) { billingAddress = undefined; }
32
32
  if (siren === void 0) { siren = ""; }
33
+ if (vatId === void 0) { vatId = ""; }
33
34
  var _this = _super.call(this, id, roles, firstname, lastname, avatar, email) || this;
34
35
  _this.vehicles = vehicles;
35
36
  _this.turnover = turnover;
@@ -39,6 +40,7 @@ var Customer = /** @class */ (function (_super) {
39
40
  _this.notes = notes;
40
41
  _this.billingAddress = billingAddress;
41
42
  _this.siren = siren;
43
+ _this.vatId = vatId;
42
44
  return _this;
43
45
  }
44
46
  return Customer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.63.0",
3
+ "version": "1.63.4",
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",
@@ -25,7 +25,7 @@ const VehiclePlateField: FunctionComponent<VehiclePlateFieldProps> = ({ onValidV
25
25
  const [error, setError] = useState<boolean>(false);
26
26
  const [lastLength, setLastLength] = useState<number>(0); // Ajout d'un état pour stocker la longueur précédente
27
27
  const [helperText, setHelperText] = useState<ReactNode>('');
28
- const MIN_FOREIGN_PLATE_LENGTH = 6;
28
+ const MIN_FOREIGN_PLATE_LENGTH = 3;
29
29
 
30
30
  // Hook de validation de la plaque
31
31
  useEffect(() => {
@@ -29,6 +29,7 @@ export default class Customer extends User {
29
29
  notes: string;
30
30
  billingAddress?: Address;
31
31
  siren?: string;
32
+ vatId?: string;
32
33
 
33
34
  constructor(
34
35
  id: string,
@@ -45,7 +46,8 @@ export default class Customer extends User {
45
46
  companyPhoneNumber: string,
46
47
  billingAddress: Address | undefined = undefined,
47
48
  notes: string,
48
- siren: string = ""
49
+ siren: string = "",
50
+ vatId: string = ""
49
51
  ) {
50
52
  super(id, roles, firstname, lastname, avatar, email);
51
53
 
@@ -57,5 +59,6 @@ export default class Customer extends User {
57
59
  this.notes = notes;
58
60
  this.billingAddress = billingAddress;
59
61
  this.siren = siren;
62
+ this.vatId = vatId;
60
63
  }
61
64
  }