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

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-d536d9c8.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,35 @@ export declare const i18nMessages: {
552
552
  update_success: string;
553
553
  };
554
554
  };
555
+ tagging: {
556
+ title: string;
557
+ add_tag: string;
558
+ search: string;
559
+ table: {
560
+ columns: {
561
+ title: string;
562
+ type: string;
563
+ entity: string;
564
+ };
565
+ };
566
+ form: {
567
+ tagDetail: string;
568
+ taggingTitle: string;
569
+ titleRequired: string;
570
+ titlePlaceholder: string;
571
+ type: string;
572
+ entity: string;
573
+ };
574
+ delete: {
575
+ title: string;
576
+ message: string;
577
+ success: string;
578
+ };
579
+ };
580
+ restaurantTagging: {
581
+ title: string;
582
+ subtitle: string;
583
+ };
555
584
  };
556
585
  };
557
586
  "zh-CN": {
@@ -1104,6 +1133,35 @@ export declare const i18nMessages: {
1104
1133
  update_success: string;
1105
1134
  };
1106
1135
  };
1136
+ tagging: {
1137
+ title: string;
1138
+ add_tag: string;
1139
+ search: string;
1140
+ table: {
1141
+ columns: {
1142
+ title: string;
1143
+ type: string;
1144
+ entity: string;
1145
+ };
1146
+ };
1147
+ form: {
1148
+ tagDetail: string;
1149
+ taggingTitle: string;
1150
+ titleRequired: string;
1151
+ titlePlaceholder: string;
1152
+ type: string;
1153
+ entity: string;
1154
+ };
1155
+ delete: {
1156
+ title: string;
1157
+ message: string;
1158
+ success: string;
1159
+ };
1160
+ };
1161
+ restaurantTagging: {
1162
+ title: string;
1163
+ subtitle: string;
1164
+ };
1107
1165
  };
1108
1166
  };
1109
1167
  };
@@ -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">>;