You've already forked AstralRinth
forked from didirus/AstralRinth
Affiliates frontend (#4380)
* Begin affiliates frontend * Significant work on hooking up affiliates ui * Clean up server nodes menu * affiliates work * update affiliate time * oops * fix local import * fix local import x2 * remove line in dashboard * lint
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
:regions="regions"
|
||||
:refresh-payment-methods="fetchPaymentData"
|
||||
:fetch-stock="fetchStock"
|
||||
:affiliate-code="affiliateCode"
|
||||
/>
|
||||
|
||||
<section
|
||||
@@ -664,6 +665,25 @@ import ServerPlanSelector from '~/components/ui/servers/marketing/ServerPlanSele
|
||||
import { useServersFetch } from '~/composables/servers/servers-fetch.ts'
|
||||
import { products } from '~/generated/state.json'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const { setAffiliateCode, getAffiliateCode } = useAffiliates()
|
||||
|
||||
const affiliateCode = ref(route.query.afl ?? null)
|
||||
|
||||
if (affiliateCode.value) {
|
||||
router.replace({
|
||||
query: {
|
||||
...route.query,
|
||||
afl: undefined,
|
||||
},
|
||||
})
|
||||
setAffiliateCode(affiliateCode.value)
|
||||
} else {
|
||||
affiliateCode.value = getAffiliateCode()
|
||||
}
|
||||
|
||||
const { addNotification } = injectNotificationManager()
|
||||
const { locale, formatMessage } = useVIntl()
|
||||
const flags = useFeatureFlags()
|
||||
@@ -853,7 +873,6 @@ async function fetchPaymentData() {
|
||||
|
||||
const selectedProjectId = ref()
|
||||
|
||||
const route = useRoute()
|
||||
const isAtCapacity = computed(
|
||||
() => isSmallAtCapacity.value && isMediumAtCapacity.value && isLargeAtCapacity.value,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user