beca-ui 2.0.19-beta.3 → 2.0.19-beta.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.
package/dist/beca-ui.js CHANGED
@@ -132927,6 +132927,20 @@ const y3e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
132927
132927
  stringify: h3e,
132928
132928
  stringifyUrl: g3e
132929
132929
  }, Symbol.toStringTag, { value: "Module" }));
132930
+ class uk {
132931
+ constructor(t, ...n) {
132932
+ D2(this, "value");
132933
+ D2(this, "errors");
132934
+ this.value = t, this.errors = n[0] === void 0 || n[0] === null ? [] : n;
132935
+ }
132936
+ get success() {
132937
+ var t;
132938
+ return !this.errors || ((t = this.errors) == null ? void 0 : t.length) === 0;
132939
+ }
132940
+ get hasErrors() {
132941
+ return this.errors !== null && Array.isArray(this.errors) && this.errors.length > 0;
132942
+ }
132943
+ }
132930
132944
  var C3e = { exports: {} };
132931
132945
  (function(e, t) {
132932
132946
  (function(n, r) {
@@ -133020,20 +133034,6 @@ const $Ot = (e) => {
133020
133034
  return;
133021
133035
  }
133022
133036
  };
133023
- class uk {
133024
- constructor(t, ...n) {
133025
- D2(this, "value");
133026
- D2(this, "errors");
133027
- this.value = t, this.errors = n[0] === void 0 || n[0] === null ? [] : n;
133028
- }
133029
- get success() {
133030
- var t;
133031
- return !this.errors || ((t = this.errors) == null ? void 0 : t.length) === 0;
133032
- }
133033
- get hasErrors() {
133034
- return this.errors !== null && Array.isArray(this.errors) && this.errors.length > 0;
133035
- }
133036
- }
133037
133037
  function OOt(...e) {
133038
133038
  e.forEach((t) => {
133039
133039
  Array != null && Array.isArray(t) ? t.forEach((n) => Hh.error(n)) : t.includes("Lỗi") ? Hh.error(t) : Hh.error("Đã xảy ra lỗi, vui lòng thử lại!");
@@ -133566,6 +133566,533 @@ class IOt {
133566
133566
  }
133567
133567
  }
133568
133568
  class POt {
133569
+ // static async search(props: SearchParamsType) {
133570
+ // const {
133571
+ // title = "",
133572
+ // page = 0,
133573
+ // pageSize = 0,
133574
+ // categoryId,
133575
+ // status,
133576
+ // isDetail,
133577
+ // workflowType,
133578
+ // } = props;
133579
+ // const result = await NetworkService.requestJson<QueryResult<WorkflowModel>>(
133580
+ // {
133581
+ // url: `/api/workflows`,
133582
+ // method: "GET",
133583
+ // data: {
133584
+ // title,
133585
+ // page,
133586
+ // pageSize,
133587
+ // categoryId,
133588
+ // status,
133589
+ // isDetail,
133590
+ // workflowType,
133591
+ // },
133592
+ // }
133593
+ // );
133594
+ // return result;
133595
+ // }
133596
+ static async getWorkflow(t, n = !1, r = !1) {
133597
+ return await Dr.requestJson({
133598
+ url: `/api/workflows/${t}`,
133599
+ method: "GET",
133600
+ data: {
133601
+ isCheckingPermission: n,
133602
+ isAdmin: r
133603
+ }
133604
+ });
133605
+ }
133606
+ // static async activate(id: number) {
133607
+ // try {
133608
+ // const result = await NetworkService.requestJson<WorkflowModel>({
133609
+ // url: `/api/workflows/activate/${id}`,
133610
+ // method: "PUT",
133611
+ // });
133612
+ // if (result.success) {
133613
+ // return result;
133614
+ // }
133615
+ // throw new Error();
133616
+ // } catch {
133617
+ // return { hasErrors: true, success: false, value: undefined, errors: [] };
133618
+ // }
133619
+ // }
133620
+ // static async deactivate(id: number) {
133621
+ // try {
133622
+ // const result = await NetworkService.requestJson<WorkflowModel>({
133623
+ // url: `/api/workflows/deactivate/${id}`,
133624
+ // method: "PUT",
133625
+ // });
133626
+ // if (result.success) {
133627
+ // return result;
133628
+ // }
133629
+ // throw new Error();
133630
+ // } catch {
133631
+ // return { hasErrors: true, success: false, value: undefined, errors: [] };
133632
+ // }
133633
+ // }
133634
+ // static async update(
133635
+ // model: WorkflowModel,
133636
+ // file?: File,
133637
+ // isDetail?: boolean | undefined
133638
+ // ) {
133639
+ // try {
133640
+ // if (isDetail) {
133641
+ // model = { ...model, isDetail };
133642
+ // }
133643
+ // if (model.startDate) {
133644
+ // model = { ...model, startDate: getStartOfDate(model.startDate) };
133645
+ // }
133646
+ // if (model.endDate) {
133647
+ // model = { ...model, endDate: getEndOfDate(model.endDate) };
133648
+ // }
133649
+ // if (model.code && model.code.length > 0) {
133650
+ // model = { ...model, code: model.code.normalize("NFC") };
133651
+ // }
133652
+ // model = { ...model, properties: [] };
133653
+ // let result = await NetworkService.requestJson<WorkflowModel>({
133654
+ // url: `/api/workflows/${model.id}`,
133655
+ // method: "PUT",
133656
+ // data: model,
133657
+ // });
133658
+ // if (result.success) {
133659
+ // if (file && result.value.id) {
133660
+ // result = await this.uploadImage(result.value.id, file);
133661
+ // }
133662
+ // return result;
133663
+ // }
133664
+ // throw new Error();
133665
+ // } catch {
133666
+ // return { hasErrors: true, success: false, value: undefined, errors: [] };
133667
+ // }
133668
+ // }
133669
+ // static async delete(id: number): Promise<Result<any>> {
133670
+ // const result = await NetworkService.requestJson({
133671
+ // url: `/api/workflows/${id}`,
133672
+ // method: "DELETE",
133673
+ // });
133674
+ // return result;
133675
+ // }
133676
+ // static async add(model: WorkflowModel): Promise<Result<WorkflowModel>> {
133677
+ // if (model.code && model.code.length > 0) {
133678
+ // model = { ...model, code: model.code.normalize("NFC") };
133679
+ // }
133680
+ // const result = await NetworkService.requestJson<WorkflowModel>({
133681
+ // url: "/api/workflows",
133682
+ // method: "POST",
133683
+ // data: model,
133684
+ // });
133685
+ // return result;
133686
+ // }
133687
+ // static async addWithFile(
133688
+ // model: WorkflowModel,
133689
+ // file: RcFile | undefined,
133690
+ // isDetail: boolean | undefined,
133691
+ // status = WorkflowStatus.Draft
133692
+ // ): Promise<Result<WorkflowModel>> {
133693
+ // model = { ...model, isDetail };
133694
+ // if (model.startDate) {
133695
+ // model = { ...model, startDate: getStartOfDate(model.startDate) };
133696
+ // }
133697
+ // if (model.endDate) {
133698
+ // model = { ...model, endDate: getEndOfDate(model.endDate) };
133699
+ // }
133700
+ // if (model.code && model.code.length > 0) {
133701
+ // model = { ...model, code: model.code.normalize("NFC") };
133702
+ // }
133703
+ // model.status = status;
133704
+ // const result = await this.add(model);
133705
+ // if (result.success) {
133706
+ // if (file && result.value.id) {
133707
+ // const uploadResult = await this.uploadImage(result.value.id, file);
133708
+ // return uploadResult;
133709
+ // }
133710
+ // }
133711
+ // return result;
133712
+ // }
133713
+ // static async updateWithFile(
133714
+ // model: WorkflowModel,
133715
+ // file?: RcFile,
133716
+ // isDetail?: boolean | undefined
133717
+ // ) {
133718
+ // try {
133719
+ // if (isDetail) {
133720
+ // model = { ...model, isDetail };
133721
+ // }
133722
+ // if (model.startDate) {
133723
+ // if (dayjs.isDayjs(model.startDate)) {
133724
+ // model.startDate = model.startDate.toDate();
133725
+ // }
133726
+ // model = { ...model, startDate: getStartOfDate(model.startDate) };
133727
+ // }
133728
+ // if (model.endDate) {
133729
+ // if (dayjs.isDayjs(model.endDate)) {
133730
+ // model.endDate = model.endDate.toDate();
133731
+ // }
133732
+ // model = { ...model, endDate: getEndOfDate(model.endDate) };
133733
+ // }
133734
+ // if (model.code && model.code.length > 0) {
133735
+ // model = { ...model, code: model.code.normalize("NFC") };
133736
+ // }
133737
+ // model = { ...model, properties: [] };
133738
+ // let result = await NetworkService.requestJson<WorkflowModel>({
133739
+ // url: `/api/workflows/${model.id}`,
133740
+ // method: "PUT",
133741
+ // data: model,
133742
+ // });
133743
+ // if (result.success) {
133744
+ // if (file && result.value.id) {
133745
+ // result = await this.uploadImage(result.value.id, file);
133746
+ // }
133747
+ // return result;
133748
+ // }
133749
+ // throw new Error();
133750
+ // } catch (e: any) {
133751
+ // return { hasErrors: true, success: false, value: undefined, errors: [] };
133752
+ // }
133753
+ // }
133754
+ // static async uploadImage(
133755
+ // id: number | string,
133756
+ // file: File
133757
+ // ): Promise<Result<WorkflowModel>> {
133758
+ // const data = new FormData();
133759
+ // data.append("file", file);
133760
+ // const result = await NetworkService.requestJson<WorkflowModel>({
133761
+ // url: `/api/workflows/${id}/uploadWorkflowAvatar`,
133762
+ // method: "POST",
133763
+ // data,
133764
+ // isFile: true,
133765
+ // });
133766
+ // return result;
133767
+ // }
133768
+ // static getImage(id: number, isCompress = false): string {
133769
+ // return `/api/Workflows/${id}/getWorkflowAvatar?isCompress=${isCompress}`;
133770
+ // }
133771
+ // static async getWorkflowSteps(
133772
+ // workflowId: number
133773
+ // ): Promise<Result<QueryResult<WorkflowStepModel>>> {
133774
+ // const data = { workflowId };
133775
+ // const result = await NetworkService.requestJson<
133776
+ // QueryResult<WorkflowStepModel>
133777
+ // >({
133778
+ // url: "/api/workflowSteps",
133779
+ // method: "GET",
133780
+ // data,
133781
+ // });
133782
+ // return result;
133783
+ // }
133784
+ // static async getStepFields(
133785
+ // workflowStepId: number
133786
+ // ): Promise<Result<QueryResult<StepFieldModel>>> {
133787
+ // const data = { stepId: workflowStepId };
133788
+ // const result = await NetworkService.requestJson<
133789
+ // QueryResult<StepFieldModel>
133790
+ // >({
133791
+ // url: "/api/stepFields",
133792
+ // method: "GET",
133793
+ // data,
133794
+ // });
133795
+ // return result;
133796
+ // }
133797
+ // static async getWorkflowStep(stepId: number) {
133798
+ // const result = await NetworkService.requestJson<WorkflowStepModel>({
133799
+ // url: "/api/workflowSteps/" + stepId,
133800
+ // method: "GET",
133801
+ // });
133802
+ // if (result.success) {
133803
+ // return result.value;
133804
+ // } else {
133805
+ // return undefined;
133806
+ // }
133807
+ // }
133808
+ // static async getAdminWorkflows(): Promise<
133809
+ // Result<QueryResult<WorkflowModel>>
133810
+ // > {
133811
+ // const result = await NetworkService.requestJson<QueryResult<WorkflowModel>>(
133812
+ // {
133813
+ // url: "/api/workflows?page=1&pageSize=100000&workflowType=1&status=1",
133814
+ // method: "GET",
133815
+ // }
133816
+ // );
133817
+ // return result;
133818
+ // }
133819
+ // static async getDynamicValues(
133820
+ // userWorkflowId: number
133821
+ // ): Promise<Result<DynamicValueModel[]>> {
133822
+ // const result = await NetworkService.requestJson<DynamicValueModel[]>({
133823
+ // url: `/api/userWorkflows/${userWorkflowId}/getDynamicValue`,
133824
+ // method: "GET",
133825
+ // });
133826
+ // return result;
133827
+ // }
133828
+ // static async getStepInfo(
133829
+ // rowsList: RowsType[],
133830
+ // stepId: number,
133831
+ // userWorkflowId?: number
133832
+ // ): Promise<StepInfoType> {
133833
+ // let result: StepInfoType = {
133834
+ // hasErrors: true,
133835
+ // success: false,
133836
+ // rows: [],
133837
+ // stepFields: [],
133838
+ // };
133839
+ // let stepFields: StepFieldModel[] = [];
133840
+ // if (stepId) {
133841
+ // const stepFieldsRes = await this.getStepFields(stepId);
133842
+ // const stepIdIsFirstStep = await this.getWorkflowStep(stepId);
133843
+ // if (stepFieldsRes.success) {
133844
+ // stepFields = stepFieldsRes.value.items;
133845
+ // const rowsTmp: RowsType[] = [];
133846
+ // let dynamicValues: DynamicValueModel[] = [];
133847
+ // if (userWorkflowId) {
133848
+ // const dynamicValuesRes = await this.getDynamicValues(userWorkflowId);
133849
+ // if (dynamicValuesRes.hasErrors) {
133850
+ // message.error(translate("GetDateErrorMessage"));
133851
+ // return {
133852
+ // hasErrors: true,
133853
+ // success: false,
133854
+ // rows: [],
133855
+ // values: [],
133856
+ // stepFields: [],
133857
+ // };
133858
+ // } else {
133859
+ // dynamicValues = dynamicValuesRes.value;
133860
+ // }
133861
+ // }
133862
+ // rowsList.map((row) => {
133863
+ // const rowTmp: ColType[] = [];
133864
+ // row.row.map((property: any) => {
133865
+ // const stepField = stepFields.find(
133866
+ // (f) => f.propertyId === property?.id
133867
+ // );
133868
+ // const dynamicValue = dynamicValues.find(
133869
+ // (dValue) => dValue.name === property?.name
133870
+ // );
133871
+ // if (dynamicValue?.value) {
133872
+ // property.defaultValue = dynamicValue?.value;
133873
+ // }
133874
+ // if (stepIdIsFirstStep && stepIdIsFirstStep.step === 1) {
133875
+ // property.isEdit = true;
133876
+ // } else if (stepField && stepField.isEdit === true) {
133877
+ // property.isEdit = stepField.isEdit;
133878
+ // }
133879
+ // if (
133880
+ // property?.debounce &&
133881
+ // (!property?.lookupItems || property?.lookupItems.length === 0) &&
133882
+ // dynamicValue
133883
+ // ) {
133884
+ // property.lookupItems = [
133885
+ // {
133886
+ // label: dynamicValue?.value,
133887
+ // value: dynamicValue?.value,
133888
+ // },
133889
+ // ];
133890
+ // }
133891
+ // if (stepField) {
133892
+ // if (stepField.isHide !== undefined && stepField.isHide !== null) {
133893
+ // property.hidden = stepField.isHide;
133894
+ // } else if (stepField.isHide === true) {
133895
+ // property.viewOnly = !stepField.isEdit && property?.viewOnly;
133896
+ // }
133897
+ // }
133898
+ // rowTmp.push(property);
133899
+ // });
133900
+ // if (rowTmp.length > 0) {
133901
+ // rowsTmp.push({ row: rowTmp });
133902
+ // }
133903
+ // });
133904
+ // result = {
133905
+ // hasErrors: false,
133906
+ // success: true,
133907
+ // rows: rowsTmp,
133908
+ // values: dynamicValues,
133909
+ // stepFields,
133910
+ // };
133911
+ // }
133912
+ // }
133913
+ // return result;
133914
+ // }
133915
+ // static async getActiveWorkflow(): Promise<Result<WorkflowDDLModel[]>> {
133916
+ // const result = await NetworkService.requestJson<WorkflowDDLModel[]>({
133917
+ // url: `/api/workflows/DDL`,
133918
+ // method: "GET",
133919
+ // data: { status: 1 },
133920
+ // });
133921
+ // return result;
133922
+ // }
133923
+ // static async getWorkflowByReportId(
133924
+ // reportId: string
133925
+ // ): Promise<Result<string>> {
133926
+ // const result = await NetworkService.requestJson<string>({
133927
+ // url: `/api/workflows/getWorkflowByReportId/${reportId}`,
133928
+ // method: "GET",
133929
+ // });
133930
+ // return result;
133931
+ // }
133932
+ // static async getMergedWorkflows(
133933
+ // title?: string,
133934
+ // categoryName?: string,
133935
+ // status?: number,
133936
+ // isDetail?: boolean,
133937
+ // isCreating?: boolean,
133938
+ // isReport?: boolean,
133939
+ // workflowTypeString?: string
133940
+ // ): Promise<Result<QueryResult<WorkflowModel>>> {
133941
+ // title = title ? title.normalize("NFC") : "";
133942
+ // categoryName = categoryName ? categoryName.normalize("NFC") : "";
133943
+ // if (isDetail === false) {
133944
+ // isDetail = undefined;
133945
+ // }
133946
+ // const result = await NetworkService.requestJson<QueryResult<WorkflowModel>>(
133947
+ // {
133948
+ // url: `/api/v2/mergedWorkflow`,
133949
+ // method: "GET",
133950
+ // data: {
133951
+ // title,
133952
+ // categoryName,
133953
+ // status,
133954
+ // isDetail,
133955
+ // isCreating,
133956
+ // isReport,
133957
+ // lang: "en",
133958
+ // workflowTypeString,
133959
+ // },
133960
+ // }
133961
+ // );
133962
+ // return result;
133963
+ // }
133964
+ // static async copyWorkflowFrom(data: any) {
133965
+ // const res = await NetworkService.requestJson<WorkflowModel>({
133966
+ // url: `/api/workflows/copyWorkflowFrom`,
133967
+ // method: "POST",
133968
+ // data,
133969
+ // });
133970
+ // return res;
133971
+ // }
133972
+ // // static async uploadAttachFiles(
133973
+ // // userWorkflowId: number,
133974
+ // // workflowId: number,
133975
+ // // workflow: WorkflowModel,
133976
+ // // attachDataSource: AttachDataType[],
133977
+ // // attachForm: FormInstance<any>,
133978
+ // // t: TransType
133979
+ // // ) {
133980
+ // // try {
133981
+ // // for (let i = 0; i < attachDataSource.length; i++) {
133982
+ // // const checkList = attachDataSource[i];
133983
+ // // const attachFormData: FileType = attachForm.getFieldValue(
133984
+ // // checkList.key
133985
+ // // );
133986
+ // // if (attachFormData && attachFormData.fileList?.length > 0) {
133987
+ // // let totalFileSize = 0;
133988
+ // // attachFormData.fileList.map((file: any) => {
133989
+ // // totalFileSize += file.size;
133990
+ // // if (
133991
+ // // totalFileSize > workflow?.maximumSizeTotal * 1048576 &&
133992
+ // // workflow?.maximumSizeTotal !== 0 &&
133993
+ // // workflow?.maximumSizeTotal !== null
133994
+ // // ) {
133995
+ // // throw new Error(
133996
+ // // t("Total capacity allowed is", {
133997
+ // // total: workflow?.maximumSizeTotal,
133998
+ // // unit: "MB",
133999
+ // // })
134000
+ // // );
134001
+ // // }
134002
+ // // });
134003
+ // // const checkListId = checkList.key?.toString().split("-")[0];
134004
+ // // const note = attachFormData.note;
134005
+ // // for (let j = 0; j < attachFormData.fileList.length; j++) {
134006
+ // // const fileItem = attachFormData.fileList[j];
134007
+ // // if (fileItem.size === 0) {
134008
+ // // throw new Error(t("Uploading files with 0 bytes is not allowed"));
134009
+ // // }
134010
+ // // if (fileItem.name.endsWith(".exe".trim())) {
134011
+ // // throw new Error(
134012
+ // // t("Not allowed file formats", {
134013
+ // // extensions: ".exe",
134014
+ // // })
134015
+ // // );
134016
+ // // }
134017
+ // // if (workflow?.allowAttachmentExtensions) {
134018
+ // // if (
134019
+ // // !checkValidFilesExtension(
134020
+ // // fileItem.name,
134021
+ // // workflow.allowAttachmentExtensions
134022
+ // // )
134023
+ // // ) {
134024
+ // // throw new Error(
134025
+ // // t("Allowed file formats", {
134026
+ // // extensions: workflow.allowAttachmentExtensions,
134027
+ // // })
134028
+ // // );
134029
+ // // }
134030
+ // // }
134031
+ // // }
134032
+ // // for (let j = 0; j < attachFormData.fileList.length; j++) {
134033
+ // // const fileItem = attachFormData.fileList[j];
134034
+ // // const uploadData: UploadFileModel = {
134035
+ // // workflowId,
134036
+ // // userWorkflowId,
134037
+ // // checkListId: Number(checkListId),
134038
+ // // name: fileItem.name,
134039
+ // // note: note ?? "",
134040
+ // // path: "",
134041
+ // // type: fileItem.type,
134042
+ // // };
134043
+ // // const uploadRes = await UserCheckListService.uploadFile(
134044
+ // // uploadData,
134045
+ // // fileItem
134046
+ // // );
134047
+ // // if (uploadRes.hasErrors) {
134048
+ // // throw new Error();
134049
+ // // }
134050
+ // // }
134051
+ // // }
134052
+ // // }
134053
+ // // } catch (err: any) {
134054
+ // // const errMessage = err.message ?? t("The files upload process failed");
134055
+ // // return {
134056
+ // // isSuccess: false,
134057
+ // // message: errMessage,
134058
+ // // };
134059
+ // // }
134060
+ // // return {
134061
+ // // isSuccess: true,
134062
+ // // };
134063
+ // // }
134064
+ // static async downloadSampleExcelFile(workflowId: number) {
134065
+ // const url = APIS.workflow.downloadSampleExcelFile(Number(workflowId));
134066
+ // NetworkService.download({
134067
+ // method: "GET",
134068
+ // url: url,
134069
+ // extension: "xlsx",
134070
+ // });
134071
+ // }
134072
+ // static async getCodeTemplateExample(workflowId: number) {
134073
+ // const res = await NetworkService.requestJson<string>({
134074
+ // url: `/api/workflows/${workflowId}/GetCodeTemplateExample`,
134075
+ // method: "GET",
134076
+ // });
134077
+ // return res;
134078
+ // }
134079
+ // static async getCodeTemplate(workflowId: number) {
134080
+ // const res = await NetworkService.requestJson<string>({
134081
+ // url: `/api/workflows/${workflowId}/GetCodeTemplate`,
134082
+ // method: "GET",
134083
+ // });
134084
+ // return res;
134085
+ // }
134086
+ // static async updateCodeTemplate(workflowId: number, template: string) {
134087
+ // const res = await NetworkService.requestJson<string>({
134088
+ // url: `/api/workflows/${workflowId}/UpdateCodeTemplate`,
134089
+ // method: "POST",
134090
+ // data: template,
134091
+ // });
134092
+ // return res;
134093
+ // }
134094
+ }
134095
+ class kOt {
133569
134096
  static async get() {
133570
134097
  return await Dr.requestJson({
133571
134098
  url: "/api/v2/workflowReport/GetDefaultAppMenuResource",
@@ -133590,7 +134117,7 @@ class ore {
133590
134117
  return !!(n && n[1] === "fullscreen");
133591
134118
  }
133592
134119
  }
133593
- function kOt() {
134120
+ function LOt() {
133594
134121
  const [e, t] = lt(0), [n, r] = lt(0), [i, o] = lt(!1), { isMobileApp: a, isFullscreenApp: l } = On(() => ({
133595
134122
  isMobileApp: ore.isMobileApp(location.pathname),
133596
134123
  isFullscreenApp: ore.isFullscreenApp(location.pathname)
@@ -133606,24 +134133,12 @@ function kOt() {
133606
134133
  };
133607
134134
  return { screenWidth: e, screenHeight: n, isMobile: i, isMobileApp: a, isFullscreenApp: l };
133608
134135
  }
133609
- function LOt() {
134136
+ function DOt() {
133610
134137
  return "Đã xảy ra lỗi, vui lòng thử lại";
133611
134138
  }
133612
- class DOt {
133613
- static async getWorkflow(t, n = !1, r = !1) {
133614
- return await Dr.requestJson({
133615
- url: `/api/workflows/${t}`,
133616
- method: "GET",
133617
- data: {
133618
- isCheckingPermission: n,
133619
- isAdmin: r
133620
- }
133621
- });
133622
- }
133623
- }
133624
134139
  const U9 = window, ZNt = (e) => {
133625
134140
  const { t } = kH(), [n] = wu.useForm(), [r, i] = lt(), [o, a] = lt(), [l, s] = lt("");
133626
- $t([]), $t(null), kOt();
134141
+ $t([]), $t(null), LOt();
133627
134142
  const {
133628
134143
  theme: c = "Light",
133629
134144
  locale: d = "vi",
@@ -133749,7 +134264,7 @@ const U9 = window, ZNt = (e) => {
133749
134264
  });
133750
134265
  }
133751
134266
  async function Z() {
133752
- const ce = await POt.get();
134267
+ const ce = await kOt.get();
133753
134268
  if (ce.success) {
133754
134269
  const ae = ce.value.find((ge) => ge.appId === "Chat");
133755
134270
  ae && (i(
@@ -133789,13 +134304,13 @@ const U9 = window, ZNt = (e) => {
133789
134304
  note: l ?? ""
133790
134305
  }, ae = await IOt.recall(h, ce);
133791
134306
  ae.success ? (Hh.success(t("Recalled successfully")), m && m()) : ae.errors && ae.errors.forEach((ge) => {
133792
- ge.includes("Lỗi") ? Hh.error(ge) : Hh.error(LOt());
134307
+ ge.includes("Lỗi") ? Hh.error(ge) : Hh.error(DOt());
133793
134308
  });
133794
134309
  }
133795
134310
  P(!1), j(!1);
133796
134311
  };
133797
134312
  async function de(ce) {
133798
- h || await DOt.getWorkflow(ce, !0);
134313
+ h || await POt.getWorkflow(ce, !0);
133799
134314
  }
133800
134315
  return /* @__PURE__ */ D("div", { children: "ádasdsa" });
133801
134316
  }, AOt = "_card_165my_1", zOt = "_title_165my_9", FOt = "_titleIcon_165my_14", HOt = "_status_165my_18", jOt = "_description_165my_22", BOt = "_content_165my_27", VOt = "_infoStatus_165my_31", WOt = "_successStatus_165my_36", UOt = "_warningStatus_165my_41", KOt = "_dangerStatus_165my_46", qOt = "_roundStatus_165my_51", GOt = "_infoItemLabel_165my_55", YOt = "_typeCard_165my_59", XOt = "_typeList_165my_63", na = {
@@ -1,76 +1,5 @@
1
- import { RowsType } from "../models/DynamicWorkflowModel";
2
- import { StepFieldModel } from "../models/StepFieldModel";
3
- import { QueryResult } from "../models/QueryResult";
4
1
  import { WorkflowModel } from "../models/WorkflowModel";
5
2
  import { Result } from "../../../models";
6
- import { RcFile } from "../..";
7
- import { WorkflowStatus } from "../models/enums/WorkflowStatus";
8
- import { WorkflowStepModel } from "../models/WorkflowStepModel";
9
- import { DynamicValueModel } from "../models/DynamicValueModel";
10
- import { WorkflowDDLModel } from "../models/WorkflowDDLModel";
11
- type StepInfoType = {
12
- success: boolean;
13
- hasErrors: boolean;
14
- rows: RowsType[];
15
- values?: any[];
16
- isAutoGenerateNewRow?: boolean;
17
- stepFields: StepFieldModel[];
18
- };
19
- type SearchParamsType = {
20
- title?: string;
21
- page?: number;
22
- pageSize?: number;
23
- categoryId?: number;
24
- status?: number;
25
- isDetail?: boolean;
26
- workflowType?: number;
27
- isCheckPermission?: boolean;
28
- };
29
3
  export default class WorkflowService {
30
- static search(props: SearchParamsType): Promise<Result<QueryResult<WorkflowModel>>>;
31
4
  static getWorkflow(id: number, isCheckingPermission?: boolean, isAdmin?: boolean): Promise<Result<WorkflowModel>>;
32
- static activate(id: number): Promise<Result<WorkflowModel> | {
33
- hasErrors: boolean;
34
- success: boolean;
35
- value: undefined;
36
- errors: never[];
37
- }>;
38
- static deactivate(id: number): Promise<Result<WorkflowModel> | {
39
- hasErrors: boolean;
40
- success: boolean;
41
- value: undefined;
42
- errors: never[];
43
- }>;
44
- static update(model: WorkflowModel, file?: File, isDetail?: boolean | undefined): Promise<Result<WorkflowModel> | {
45
- hasErrors: boolean;
46
- success: boolean;
47
- value: undefined;
48
- errors: never[];
49
- }>;
50
- static delete(id: number): Promise<Result<any>>;
51
- static add(model: WorkflowModel): Promise<Result<WorkflowModel>>;
52
- static addWithFile(model: WorkflowModel, file: RcFile | undefined, isDetail: boolean | undefined, status?: WorkflowStatus): Promise<Result<WorkflowModel>>;
53
- static updateWithFile(model: WorkflowModel, file?: RcFile, isDetail?: boolean | undefined): Promise<Result<WorkflowModel> | {
54
- hasErrors: boolean;
55
- success: boolean;
56
- value: undefined;
57
- errors: never[];
58
- }>;
59
- static uploadImage(id: number | string, file: File): Promise<Result<WorkflowModel>>;
60
- static getImage(id: number, isCompress?: boolean): string;
61
- static getWorkflowSteps(workflowId: number): Promise<Result<QueryResult<WorkflowStepModel>>>;
62
- static getStepFields(workflowStepId: number): Promise<Result<QueryResult<StepFieldModel>>>;
63
- static getWorkflowStep(stepId: number): Promise<WorkflowStepModel | undefined>;
64
- static getAdminWorkflows(): Promise<Result<QueryResult<WorkflowModel>>>;
65
- static getDynamicValues(userWorkflowId: number): Promise<Result<DynamicValueModel[]>>;
66
- static getStepInfo(rowsList: RowsType[], stepId: number, userWorkflowId?: number): Promise<StepInfoType>;
67
- static getActiveWorkflow(): Promise<Result<WorkflowDDLModel[]>>;
68
- static getWorkflowByReportId(reportId: string): Promise<Result<string>>;
69
- static getMergedWorkflows(title?: string, categoryName?: string, status?: number, isDetail?: boolean, isCreating?: boolean, isReport?: boolean, workflowTypeString?: string): Promise<Result<QueryResult<WorkflowModel>>>;
70
- static copyWorkflowFrom(data: any): Promise<Result<WorkflowModel>>;
71
- static downloadSampleExcelFile(workflowId: number): Promise<void>;
72
- static getCodeTemplateExample(workflowId: number): Promise<Result<string>>;
73
- static getCodeTemplate(workflowId: number): Promise<Result<string>>;
74
- static updateCodeTemplate(workflowId: number, template: string): Promise<Result<string>>;
75
5
  }
76
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beca-ui",
3
- "version": "2.0.19-beta.3",
3
+ "version": "2.0.19-beta.4",
4
4
  "description": "Becawork UI",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1,4 +0,0 @@
1
- import { WorkflowModel } from "../models/WorkflowModel";
2
- export declare class TestService {
3
- static getWorkflow(id: number, isCheckingPermission?: boolean, isAdmin?: boolean): Promise<import("../../../models").Result<WorkflowModel>>;
4
- }