Skip to content

Commit

Permalink
Merge pull request #269 from LL08-MathematicalModelling-dowell/fronte…
Browse files Browse the repository at this point in the history
…nd-Norah

Frontend norah
  • Loading branch information
norahwinda authored Jun 6, 2024
2 parents ac9da59 + 3b727c4 commit c675387
Show file tree
Hide file tree
Showing 6 changed files with 356 additions and 11 deletions.
5 changes: 5 additions & 0 deletions src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import {
ReportAnalyis,
Booth,
NpsScaleTest,
NPSScale,
} from './pages/scales/report';

import {
Expand Down Expand Up @@ -133,6 +134,10 @@ const router = createBrowserRouter([
path: `${basePath}/home/master-link/scale`,
element: <NpsScaleTest />,
},
{
path: `${basePath}/home/master-link/npsscale`,
element: <NPSScale />,
},
{
path: `${basePath}/home/pc-scale`,
element: <PairedScale />,
Expand Down
6 changes: 5 additions & 1 deletion src/pages/scales/report/Booth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,22 @@

import React from 'react'
import { useState, useEffect} from 'react';
import { Link, useParams, useSearchParams } from "react-router-dom";
import { Link, useParams, useLocation, useSearchParams } from "react-router-dom";
import logo from "../../../../src/assets/dowell.png"
const Booth = () => {

const [boothInput, setBoothInput] = useState(0)

const [searchParams, setSearchParams] = useSearchParams();
const location = useLocation();
const workspaceId=searchParams.get("workspace_id")
const scaleId=searchParams.get("scale_id")
const scale_type =searchParams.get("scale_type")
const channelName=searchParams.get("channel")
console.log(scaleId,channelName,workspaceId)

console.log(scale_type, "GGG")


const handleGoButton = () =>{
window.location.href=`https://100035.pythonanywhere.com/nps-lite/api/v5/nps-lite-create-scale/?user=False&scale_type=nps_lite&workspace_id=${workspaceId}&username=HeenaK&scale_id=${scaleId}&channel_name=${channelName}&instance_id=${boothInput}`
Expand Down
Loading

0 comments on commit c675387

Please sign in to comment.