@feedmepos/mf-settings 0.0.46 → 0.0.47-beta.2

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/app.js CHANGED
@@ -1,12 +1,15 @@
1
- import { _ as a, s as e, q as n, t as g } from "./app-db5d61e5.js";
1
+ import { I as g, G as f, E as u, H as x } from "./app-f31578ee.js";
2
2
  import "@feedmepos/mf-common";
3
3
  import "@feedmepos/mf-mdm";
4
4
  import "vue";
5
5
  import "vue-router";
6
6
  import "@feedmepos/mf-e-invoice";
7
+ import "@feedmepos/ui-library";
8
+ import "pinia";
9
+ import "@vue/devtools-api";
7
10
  export {
8
- a as FmApp,
9
- e as i18nMessages,
10
- n as initSettings,
11
- g as routers
11
+ g as FmApp,
12
+ f as i18nMessages,
13
+ u as initSettings,
14
+ x as routers
12
15
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,4 +1,4 @@
1
- import type { FdoBusiness } from "@feedmepos/core/entity";
1
+ import type { FdoBusiness, FdoCustomAttribute } from "@feedmepos/core/entity";
2
2
  export interface UpdateBusinessProfile {
3
3
  name: string;
4
4
  url?: string;
@@ -21,7 +21,10 @@ export interface IAgent {
21
21
  isReseller: boolean;
22
22
  }
23
23
  export declare const businessApi: {
24
+ readBusiness(id: string): Promise<FdoBusiness>;
24
25
  updateBusinessProfile(id: string, data: UpdateBusinessProfile): Promise<FdoBusiness>;
26
+ updateBusinessAttributeSettings(id: string, data: FdoCustomAttribute[]): Promise<FdoBusiness>;
27
+ updateRestaurantAttributeSettings(id: string, data: FdoCustomAttribute[]): Promise<FdoBusiness>;
25
28
  readAgentByCode(code: string): Promise<IAgent | null>;
26
29
  createBusiness(data: Partial<FdoBusiness>, country: string): Promise<FdoBusiness>;
27
30
  readBusinesses(country: string): Promise<FdoBusiness[]>;
@@ -1,6 +1,7 @@
1
1
  import type { ExtendedRestaurant } from "@/types/restaurant";
2
- import type { FdoPayoutAccount, FdoProfile, FdoRestaurant } from "@feedmepos/core/entity";
2
+ import type { FdoProfile, FdoRestaurant } from "@feedmepos/core/entity";
3
3
  import { type AxiosResponse } from "axios";
4
+ export type RestaurantAttributes = Record<string, string>;
4
5
  export declare function formatRestaurant(restaurant: FdoRestaurant): ExtendedRestaurant;
5
6
  export declare function getRestaurantData(response: AxiosResponse<FdoRestaurant>): ExtendedRestaurant;
6
7
  export declare function getRestaurantsData(response: AxiosResponse<FdoRestaurant[]>): Promise<ExtendedRestaurant[]>;
@@ -10,5 +11,5 @@ export declare const restaurantApi: {
10
11
  readRestaurantsByBusiness(): Promise<ExtendedRestaurant[]>;
11
12
  createRestaurant(data: Partial<FdoRestaurant>): Promise<ExtendedRestaurant>;
12
13
  updateRestaurantProfile(restaurantId: string, profile: FdoProfile): Promise<ExtendedRestaurant>;
13
- updatePayoutAccount(restaurantId: string, payload: FdoPayoutAccount): Promise<ExtendedRestaurant>;
14
+ updateRestaurantAttributes(restaurantId: string, attributes: any): Promise<FdoRestaurant>;
14
15
  };
@@ -552,6 +552,38 @@ export declare const i18nMessages: {
552
552
  update_success: string;
553
553
  };
554
554
  };
555
+ tagging: {
556
+ title: string;
557
+ add_tag: string;
558
+ edit_tag: string;
559
+ search: string;
560
+ table: {
561
+ columns: {
562
+ title: string;
563
+ type: string;
564
+ entity: string;
565
+ };
566
+ };
567
+ form: {
568
+ tagDetail: string;
569
+ taggingTitle: string;
570
+ titleRequired: string;
571
+ titleUnique: string;
572
+ titleRegex: string;
573
+ titlePlaceholder: string;
574
+ type: string;
575
+ entity: string;
576
+ };
577
+ delete: {
578
+ title: string;
579
+ message: string;
580
+ success: string;
581
+ };
582
+ };
583
+ restaurantTagging: {
584
+ title: string;
585
+ subtitle: string;
586
+ };
555
587
  };
556
588
  };
557
589
  "zh-CN": {
@@ -1104,6 +1136,37 @@ export declare const i18nMessages: {
1104
1136
  update_success: string;
1105
1137
  };
1106
1138
  };
1139
+ tagging: {
1140
+ title: string;
1141
+ add_tag: string;
1142
+ search: string;
1143
+ table: {
1144
+ columns: {
1145
+ title: string;
1146
+ type: string;
1147
+ entity: string;
1148
+ };
1149
+ };
1150
+ form: {
1151
+ tagDetail: string;
1152
+ taggingTitle: string;
1153
+ titleRequired: string;
1154
+ titleUnique: string;
1155
+ titleRegex: string;
1156
+ titlePlaceholder: string;
1157
+ type: string;
1158
+ entity: string;
1159
+ };
1160
+ delete: {
1161
+ title: string;
1162
+ message: string;
1163
+ success: string;
1164
+ };
1165
+ };
1166
+ restaurantTagging: {
1167
+ title: string;
1168
+ subtitle: string;
1169
+ };
1107
1170
  };
1108
1171
  };
1109
1172
  };
@@ -41,8 +41,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
41
41
  required: true;
42
42
  };
43
43
  }>> & Readonly<{}>, {
44
- restaurantId: string;
45
44
  initialValue: RestaurantDialogData;
45
+ restaurantId: string;
46
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
47
47
  trigger?(_: {
48
48
  trigger: (restaurantId?: string | undefined, initialValue?: RestaurantDialogData | undefined) => void;
@@ -0,0 +1,39 @@
1
+ import { type PropType } from "vue";
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ initialValue: {
4
+ type: PropType<{
5
+ type: "string" | "number" | "boolean" | "date";
6
+ key: string;
7
+ entity: "item" | "restaurant";
8
+ }>;
9
+ default: undefined;
10
+ };
11
+ }>, {
12
+ show: import("vue").Ref<boolean, boolean>;
13
+ trigger: (event?: any) => void;
14
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ initialValue: {
16
+ type: PropType<{
17
+ type: "string" | "number" | "boolean" | "date";
18
+ key: string;
19
+ entity: "item" | "restaurant";
20
+ }>;
21
+ default: undefined;
22
+ };
23
+ }>> & Readonly<{}>, {
24
+ initialValue: {
25
+ type: "string" | "number" | "boolean" | "date";
26
+ key: string;
27
+ entity: "item" | "restaurant";
28
+ };
29
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
30
+ default?(_: {
31
+ trigger: (event?: any) => void;
32
+ }): any;
33
+ }>;
34
+ export default _default;
35
+ type __VLS_WithTemplateSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };
@@ -6,7 +6,7 @@ type UpdateRestaurantData = {
6
6
  newPhotos?: File[];
7
7
  } & FdoProfile;
8
8
  export declare const useRestaurantManage: () => {
9
- createRestaurant(businessId: string, data: UpdateRestaurantData): Promise<void>;
9
+ createRestaurant(businessId: string, data: UpdateRestaurantData, attributes?: any): Promise<void>;
10
10
  updateRestaurantProfile(restaurant: ExtendedRestaurant, data: UpdateRestaurantData): Promise<void>;
11
11
  };
12
12
  export {};
@@ -0,0 +1,83 @@
1
+ import { type FdoCustomAttribute } from "@feedmepos/core/entity";
2
+ export declare const useAttributeSettingsStore: import("pinia").StoreDefinition<"mf-settings-attribute-settings", import("pinia")._UnwrapAll<Pick<{
3
+ customAttributes: import("vue").Ref<{
4
+ type: "string" | "number" | "boolean" | "date";
5
+ key: string;
6
+ entity: "item" | "restaurant";
7
+ }[], {
8
+ type: "string" | "number" | "boolean" | "date";
9
+ key: string;
10
+ entity: "item" | "restaurant";
11
+ }[] | {
12
+ type: "string" | "number" | "boolean" | "date";
13
+ key: string;
14
+ entity: "item" | "restaurant";
15
+ }[]>;
16
+ restaurantAttributes: import("vue").ComputedRef<{
17
+ type: "string" | "number" | "boolean" | "date";
18
+ key: string;
19
+ entity: "item" | "restaurant";
20
+ }[]>;
21
+ itemAttributes: import("vue").ComputedRef<{
22
+ type: "string" | "number" | "boolean" | "date";
23
+ key: string;
24
+ entity: "item" | "restaurant";
25
+ }[]>;
26
+ readAttributeSettings: () => Promise<void>;
27
+ addOrUpdateAttribute: (attribute: FdoCustomAttribute) => Promise<void>;
28
+ deleteAttribute: (attribute: FdoCustomAttribute) => Promise<void>;
29
+ }, "customAttributes">>, Pick<{
30
+ customAttributes: import("vue").Ref<{
31
+ type: "string" | "number" | "boolean" | "date";
32
+ key: string;
33
+ entity: "item" | "restaurant";
34
+ }[], {
35
+ type: "string" | "number" | "boolean" | "date";
36
+ key: string;
37
+ entity: "item" | "restaurant";
38
+ }[] | {
39
+ type: "string" | "number" | "boolean" | "date";
40
+ key: string;
41
+ entity: "item" | "restaurant";
42
+ }[]>;
43
+ restaurantAttributes: import("vue").ComputedRef<{
44
+ type: "string" | "number" | "boolean" | "date";
45
+ key: string;
46
+ entity: "item" | "restaurant";
47
+ }[]>;
48
+ itemAttributes: import("vue").ComputedRef<{
49
+ type: "string" | "number" | "boolean" | "date";
50
+ key: string;
51
+ entity: "item" | "restaurant";
52
+ }[]>;
53
+ readAttributeSettings: () => Promise<void>;
54
+ addOrUpdateAttribute: (attribute: FdoCustomAttribute) => Promise<void>;
55
+ deleteAttribute: (attribute: FdoCustomAttribute) => Promise<void>;
56
+ }, "restaurantAttributes" | "itemAttributes">, Pick<{
57
+ customAttributes: import("vue").Ref<{
58
+ type: "string" | "number" | "boolean" | "date";
59
+ key: string;
60
+ entity: "item" | "restaurant";
61
+ }[], {
62
+ type: "string" | "number" | "boolean" | "date";
63
+ key: string;
64
+ entity: "item" | "restaurant";
65
+ }[] | {
66
+ type: "string" | "number" | "boolean" | "date";
67
+ key: string;
68
+ entity: "item" | "restaurant";
69
+ }[]>;
70
+ restaurantAttributes: import("vue").ComputedRef<{
71
+ type: "string" | "number" | "boolean" | "date";
72
+ key: string;
73
+ entity: "item" | "restaurant";
74
+ }[]>;
75
+ itemAttributes: import("vue").ComputedRef<{
76
+ type: "string" | "number" | "boolean" | "date";
77
+ key: string;
78
+ entity: "item" | "restaurant";
79
+ }[]>;
80
+ readAttributeSettings: () => Promise<void>;
81
+ addOrUpdateAttribute: (attribute: FdoCustomAttribute) => Promise<void>;
82
+ deleteAttribute: (attribute: FdoCustomAttribute) => Promise<void>;
83
+ }, "readAttributeSettings" | "addOrUpdateAttribute" | "deleteAttribute">>;