aboutsummaryrefslogtreecommitdiff
path: root/src/Widget.tsx
diff options
context:
space:
mode:
authorMax Nanis2025-06-10 05:21:19 +0700
committerMax Nanis2025-06-10 05:21:19 +0700
commitd7bb480ab6bd2172a04ecb304d012206e0c03e8f (patch)
tree783c57ea92e9bf50aec460e2e9b4a9e0ef7a512b /src/Widget.tsx
parentabec6d734cde8a2bb0924989b1c5801e924137c3 (diff)
downloadpanel-ui-d7bb480ab6bd2172a04ecb304d012206e0c03e8f.tar.gz
panel-ui-d7bb480ab6bd2172a04ecb304d012206e0c03e8f.zip
Adding taskStatus fetch. Showing list of Task Attempts & starting heatmap calendar.
Diffstat (limited to 'src/Widget.tsx')
-rw-r--r--src/Widget.tsx15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Widget.tsx b/src/Widget.tsx
index 16dba81..0fc0dca 100644
--- a/src/Widget.tsx
+++ b/src/Widget.tsx
@@ -5,6 +5,9 @@ import {SidebarInset, SidebarProvider} from "@/components/ui/sidebar"
import {Offerwall} from "@/pages/Offerwall.tsx"
import {QuestionsPage} from "@/pages/Questions.tsx";
import {Demographics} from "@/pages/Demographics.tsx"
+import {CashoutMethodsPage} from "@/pages/CashoutMethods.tsx";
+import {TransactionHistoryPage} from "@/pages/TransactionHistory.tsx"
+import {TaskAttemptHistoryPage} from "@/pages/TaskAttemptHistory.tsx";
import {useAppDispatch, useAppSelector} from "@/hooks.ts";
import {
@@ -14,6 +17,7 @@ import {
ProductUserApi,
ProfilingQuestionsApi,
QuestionInfo,
+ StatusApi,
UserProfileKnowledge,
UserWalletBalance,
WalletApi
@@ -22,12 +26,12 @@ import {ProfileQuestion, setQuestions} from "@/models/questionSlice.ts";
import {setBuckets} from "@/models/bucketSlice.ts";
import {setCashoutMethods} from "@/models/cashoutMethodSlice.ts";
import {setWallet} from "@/models/walletSlice.ts"
-import {CashoutMethodsPage} from "@/pages/CashoutMethods.tsx";
import {setUpkQuestions} from "@/models/upkQuestionSlice.ts"
import {setAvailabilityCount, setOfferwallId} from "@/models/appSlice.ts"
import {setUpkAnswers} from "@/models/userUpkAnswerSlice.ts";
import {setMarketplaceAnswers} from "@/models/userMarketplaceAnswerSlice.ts";
import {setUserProfile} from "@/models/userProfileSlice.ts";
+import {setTaskStatuses} from "@/models/taskStatusSlice.ts"
import './index.css';
@@ -52,6 +56,12 @@ const Widget = () => {
})
.catch(err => console.log(err));
+ new StatusApi().listTaskStatusesProductIdStatusGet(app.bpid, app.bpuid)
+ .then(res => {
+ dispatch(setTaskStatuses(res.data.tasks_status))
+ })
+ .catch(err => console.log(err))
+
new ProductUserApi().userProfileProductIdUserProductUserIdProfileGet(app.bpid, app.bpuid)
.then(res => {
dispatch(setUserProfile(res.data["user-profile"]))
@@ -106,7 +116,10 @@ const Widget = () => {
{app.currentPage === 'offerwall' && <Offerwall/>}
{app.currentPage === 'questions' && <QuestionsPage/>}
{app.currentPage === 'cashout_methods' && <CashoutMethodsPage/>}
+ {app.currentPage === 'task_attempts' && <TaskAttemptHistoryPage/>}
+
{app.currentPage === 'demographics' && <Demographics/>}
+ {app.currentPage === 'transaction_history' && <TransactionHistoryPage/>}
</div>
</div>
</div>