代理ui
@ -165,7 +165,10 @@
|
|||||||
></span>
|
></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="qualification-grid">
|
<div class="qualification-grid">
|
||||||
<article class="qualification-card">
|
<article
|
||||||
|
class="qualification-card"
|
||||||
|
id="agencyIdentityCard"
|
||||||
|
>
|
||||||
<p data-i18n="agencyOpening.agencyIdentity">
|
<p data-i18n="agencyOpening.agencyIdentity">
|
||||||
Agency Identity
|
Agency Identity
|
||||||
</p>
|
</p>
|
||||||
@ -173,21 +176,29 @@
|
|||||||
>Agency</strong
|
>Agency</strong
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
class="status-icon"
|
||||||
src="./assets/status-check.png"
|
src="./assets/status-check.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</article>
|
</article>
|
||||||
<article class="qualification-card">
|
<article
|
||||||
|
class="qualification-card"
|
||||||
|
id="hostCountCard"
|
||||||
|
>
|
||||||
<p data-i18n="agencyOpening.hostCount">
|
<p data-i18n="agencyOpening.hostCount">
|
||||||
Host Count
|
Host Count
|
||||||
</p>
|
</p>
|
||||||
<strong id="hostCountText">12 / 10+</strong>
|
<strong id="hostCountText">12 > 10</strong>
|
||||||
<img
|
<img
|
||||||
|
class="status-icon"
|
||||||
src="./assets/status-check.png"
|
src="./assets/status-check.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</article>
|
</article>
|
||||||
<article class="qualification-card">
|
<article
|
||||||
|
class="qualification-card"
|
||||||
|
id="openingStatusCard"
|
||||||
|
>
|
||||||
<p data-i18n="agencyOpening.openingStatus">
|
<p data-i18n="agencyOpening.openingStatus">
|
||||||
Opening Status
|
Opening Status
|
||||||
</p>
|
</p>
|
||||||
@ -195,6 +206,7 @@
|
|||||||
>Not Joined</strong
|
>Not Joined</strong
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
class="status-icon"
|
||||||
src="./assets/status-check.png"
|
src="./assets/status-check.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -120,6 +120,13 @@
|
|||||||
['eligible', 'can_apply', 'canApply'],
|
['eligible', 'can_apply', 'canApply'],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
var ineligibleReason = String(
|
||||||
|
firstValue(
|
||||||
|
data,
|
||||||
|
['ineligible_reason', 'ineligibleReason'],
|
||||||
|
''
|
||||||
|
) || ''
|
||||||
|
);
|
||||||
var hostCount =
|
var hostCount =
|
||||||
Number(
|
Number(
|
||||||
firstValue(qualification, ['host_count', 'hostCount'], 12)
|
firstValue(qualification, ['host_count', 'hostCount'], 12)
|
||||||
@ -170,6 +177,7 @@
|
|||||||
? t('agencyOpening.joined', 'Joined')
|
? t('agencyOpening.joined', 'Joined')
|
||||||
: t('agencyOpening.notJoined', 'Not Joined')
|
: t('agencyOpening.notJoined', 'Not Joined')
|
||||||
),
|
),
|
||||||
|
ineligibleReason: ineligibleReason,
|
||||||
eligible: Boolean(eligible) && !joined,
|
eligible: Boolean(eligible) && !joined,
|
||||||
},
|
},
|
||||||
rewards: Array.isArray(
|
rewards: Array.isArray(
|
||||||
@ -306,15 +314,31 @@
|
|||||||
state = data || mockStatus();
|
state = data || mockStatus();
|
||||||
timeOffsetMS = Date.now() - state.serverTimeMS;
|
timeOffsetMS = Date.now() - state.serverTimeMS;
|
||||||
countdownEndAt = state.endAt;
|
countdownEndAt = state.endAt;
|
||||||
|
var identityQualified =
|
||||||
|
String(state.qualification.identity || '')
|
||||||
|
.toLowerCase()
|
||||||
|
.indexOf('agency') >= 0 &&
|
||||||
|
state.qualification.ineligibleReason !==
|
||||||
|
'active_agency_owner_required';
|
||||||
|
var hostQualified =
|
||||||
|
Number(state.qualification.hostCount || 0) >
|
||||||
|
Number(state.qualification.hostRequirement || 0);
|
||||||
|
var statusQualified =
|
||||||
|
!state.joined &&
|
||||||
|
String(state.qualification.openingStatus || '').toLowerCase() !==
|
||||||
|
'disabled';
|
||||||
|
|
||||||
document.getElementById('agencyIdentityText').textContent =
|
document.getElementById('agencyIdentityText').textContent =
|
||||||
state.qualification.identity;
|
state.qualification.identity;
|
||||||
document.getElementById('hostCountText').textContent =
|
document.getElementById('hostCountText').textContent =
|
||||||
state.qualification.hostCount +
|
state.qualification.hostCount +
|
||||||
' / > ' +
|
' > ' +
|
||||||
state.qualification.hostRequirement;
|
state.qualification.hostRequirement;
|
||||||
document.getElementById('openingStatusText').textContent =
|
document.getElementById('openingStatusText').textContent =
|
||||||
state.qualification.openingStatus;
|
state.qualification.openingStatus;
|
||||||
|
setQualified('agencyIdentityCard', identityQualified);
|
||||||
|
setQualified('hostCountCard', hostQualified);
|
||||||
|
setQualified('openingStatusCard', statusQualified);
|
||||||
document.getElementById('eligibilityText').textContent = state
|
document.getElementById('eligibilityText').textContent = state
|
||||||
.qualification.eligible
|
.qualification.eligible
|
||||||
? t('agencyOpening.eligible', 'Eligible To Apply')
|
? t('agencyOpening.eligible', 'Eligible To Apply')
|
||||||
@ -338,6 +362,12 @@
|
|||||||
countdownTimer = window.setInterval(updateCountdown, 1000);
|
countdownTimer = window.setInterval(updateCountdown, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setQualified(id, qualified) {
|
||||||
|
var node = document.getElementById(id);
|
||||||
|
if (!node) return;
|
||||||
|
node.classList.toggle('is-qualified', Boolean(qualified));
|
||||||
|
}
|
||||||
|
|
||||||
function showToast(message) {
|
function showToast(message) {
|
||||||
if (window.HyAppToast && window.HyAppToast.show) {
|
if (window.HyAppToast && window.HyAppToast.show) {
|
||||||
window.HyAppToast.show(message);
|
window.HyAppToast.show(message);
|
||||||
|
|||||||
@ -456,16 +456,21 @@ button:focus-visible {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qualification-card img {
|
.qualification-card .status-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -14px;
|
right: -14px;
|
||||||
bottom: -12px;
|
bottom: -12px;
|
||||||
|
display: none;
|
||||||
width: 70px;
|
width: 70px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.qualification-card.is-qualified .status-icon {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.apply-button {
|
.apply-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 217px;
|
left: 217px;
|
||||||
|
|||||||
BIN
activity/cp-space/assets/cp-level-1.png
Normal file
|
After Width: | Height: | Size: 278 KiB |
BIN
activity/cp-space/assets/cp-level-2.png
Normal file
|
After Width: | Height: | Size: 410 KiB |
BIN
activity/cp-space/assets/cp-level-3.png
Normal file
|
After Width: | Height: | Size: 472 KiB |
BIN
activity/cp-space/assets/cp-level-4.png
Normal file
|
After Width: | Height: | Size: 506 KiB |
BIN
activity/cp-space/assets/cp-level-5.png
Normal file
|
After Width: | Height: | Size: 447 KiB |
|
After Width: | Height: | Size: 150 KiB |
BIN
activity/cp-space/assets/figma-source/figma-cards-clean-wide.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 95 KiB |
BIN
activity/cp-space/assets/figma-source/figma-cp-zoomed-wide.png
Normal file
|
After Width: | Height: | Size: 290 KiB |
BIN
activity/cp-space/assets/figma-source/figma-cp-zoomed.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 158 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 137 KiB |