) {
if (props.public) {
- console.log(price);
- return price.public;
+ return prices.filter((price) => price.public);
}
- return true;
+ return prices;
}
const isUnderMinPrice = computed(() => {
@@ -337,7 +335,7 @@ export default defineComponent({
isUnderMinPrice,
hasPermission,
PERMISSIONS,
- isPublic,
+ filterPublic,
};
},
});
diff --git a/test.ts b/test.ts
deleted file mode 100644
index 643b509..0000000
--- a/test.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-declare namespace FG {
- interface Notification {
- id: number;
- plugin: string;
- text: string;
- data?: any;
- time: Date;
- }
- interface User {
- userid: string;
- display_name: string;
- firstname: string;
- lastname: string;
- mail: string;
- birthday?: Date;
- roles: Array
;
- permissions?: Array;
- avatar_url?: string;
- }
- interface Session {
- expires: Date;
- token: string;
- lifetime: number;
- browser: string;
- platform: string;
- userid: string;
- }
- type Permission = string;
- interface Role {
- id: number;
- name: string;
- permissions: Array;
- }
- interface Drink {
- id: number;
- article_id?: string;
- package_size?: number;
- name: string;
- volume?: number;
- cost_per_volume?: number;
- cost_per_package?: number;
- uuid: string;
- receipt?: Array;
- tags?: Array;
- type?: DrinkType;
- volumes: Array;
- }
- interface DrinkIngredient {
- id: number;
- volume: number;
- ingredient_id: number;
- cost_per_volume: number;
- name: string;
- }
- interface DrinkPrice {
- id: number;
- price: number;
- volume: DrinkPriceVolume;
- public: boolean;
- description?: string;
- }
- interface DrinkPriceVolume {
- id: number;
- drink: Drink;
- volume: number;
- min_prices: Array;
- prices: Array;
- ingredients: Array;
- }
- interface DrinkType {
- id: number;
- name: string;
- }
- interface ExtraIngredient {
- id: number;
- name: string;
- price: number;
- }
- interface Ingredient {
- id: number;
- drink_ingredient?: DrinkIngredient;
- extra_ingredient?: ExtraIngredient;
- }
- interface MinPrices {
- percentage: number;
- price: number;
- }
- interface Tag {
- id: number;
- name: string;
- color: string;
- }
-}