eservices-core 1.0.560 → 1.0.562
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Form } from "jenesius-vue-form";
|
|
2
|
-
export default function useFormMetadata(form: Form,
|
|
2
|
+
export default function useFormMetadata(form: Form, id: number): void;
|
|
@@ -2,4 +2,5 @@ import { MetadataResponseInterface } from "../types/metadata-types";
|
|
|
2
2
|
export default class metadataService {
|
|
3
3
|
private static url;
|
|
4
4
|
static get(entity: string, criteria?: string, id?: any): Promise<MetadataResponseInterface>;
|
|
5
|
+
static getById(entity: string, id: any): Promise<MetadataResponseInterface>;
|
|
5
6
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.562
|
|
3
3
|
* (c) 2023 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -5022,6 +5022,10 @@ class metadataService {
|
|
|
5022
5022
|
}).then(res => res.json());
|
|
5023
5023
|
});
|
|
5024
5024
|
}
|
|
5025
|
+
static getById(entity, id) {
|
|
5026
|
+
return fetch(this.url() + `${entity}/${id}`)
|
|
5027
|
+
.then(res => res.json());
|
|
5028
|
+
}
|
|
5025
5029
|
}
|
|
5026
5030
|
|
|
5027
5031
|
class InvitationService {
|
|
@@ -5359,11 +5363,11 @@ function debounce(fn, delay = 1000) {
|
|
|
5359
5363
|
};
|
|
5360
5364
|
}
|
|
5361
5365
|
|
|
5362
|
-
function useFormMetadata(form,
|
|
5366
|
+
function useFormMetadata(form, id) {
|
|
5363
5367
|
form.on(jenesiusVueForm.Form.EVENT_READ, () => {
|
|
5364
5368
|
if (!form.name)
|
|
5365
5369
|
return;
|
|
5366
|
-
metadataService.
|
|
5370
|
+
metadataService.getById(form.name, id)
|
|
5367
5371
|
.then(res => {
|
|
5368
5372
|
res.fields.forEach(field => {
|
|
5369
5373
|
field.canSet ? form.enable(field.name) : form.disable(field.name);
|
|
@@ -5386,6 +5390,7 @@ class ActionError extends WrapError {
|
|
|
5386
5390
|
|
|
5387
5391
|
/**
|
|
5388
5392
|
* @description Получение метаданных для формы
|
|
5393
|
+
* @deprecated
|
|
5389
5394
|
* */
|
|
5390
5395
|
function useFormAction(form, options) {
|
|
5391
5396
|
/**
|