-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b19bd5
commit 8c30c4f
Showing
3 changed files
with
78 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
frontends/member_module/src/components/subscription/common/subscriptionBadge.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<div class="px-2 rounded-full text-xs font-bold text-center text-gray-900" :class="statusColor"> | ||
YKS-{{ subscription.id }} | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type {Subscription} from "@/api/query/model"; | ||
import {computed} from "vue"; | ||
import {SubscriptionStatusEnum} from "@/api/query/enum"; | ||
const props = defineProps<{ | ||
subscription: Subscription, | ||
}>(); | ||
const statusColor = computed((): string => { | ||
let _color = 'bg-yellow-300'; | ||
switch (props.subscription.status) { | ||
case SubscriptionStatusEnum.AWAITING_PAYMENT: | ||
_color = 'bg-orange-300'; | ||
break; | ||
case SubscriptionStatusEnum.PAYED: | ||
_color = 'bg-green-200'; | ||
break; | ||
case SubscriptionStatusEnum.COMPLETE: | ||
_color = 'bg-green-400'; | ||
break; | ||
case SubscriptionStatusEnum.CANCELED: | ||
_color = 'bg-red-300 text-white'; | ||
break; | ||
default: | ||
_color = 'bg-yellow-300'; | ||
break; | ||
} | ||
return _color; | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
27 changes: 27 additions & 0 deletions
27
frontends/member_module/src/components/subscription/common/subscriptionType.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<div class="flex gap-2"> | ||
<div class="px-2 rounded-full text-xs text-center bg-gray-300 h-4 text-gray-900" | ||
v-if="subscription.memberSubscriptionIsPartSubscription"> | ||
Lid | ||
</div> | ||
<div class="text-xs" | ||
v-if="subscription.memberSubscriptionIsPartSubscription && subscription.licenseIsPartSubscription"> + </div> | ||
<div class="px-2 rounded-full text-xs text-center bg-gray-300 h-4 text-gray-900" | ||
v-if="subscription.licenseIsPartSubscription"> | ||
Vergunning | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import type {Subscription} from "@/api/query/model"; | ||
const props = defineProps<{ | ||
subscription: Subscription, | ||
}>(); | ||
</script> | ||
|
||
<style scoped> | ||
</style> |