Skip to content

Commit

Permalink
Merge pull request #1507 from gtech-mulearn/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
viraka authored May 19, 2024
2 parents e54cc72 + 8687adb commit dd94de0
Show file tree
Hide file tree
Showing 21 changed files with 1,294 additions and 154 deletions.
60 changes: 0 additions & 60 deletions .github/ISSUE_TEMPLATE/feature.md

This file was deleted.

80 changes: 28 additions & 52 deletions .github/ISSUE_TEMPLATE/feature_form.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,46 @@
name: Mulearn Ticket Form
description: Create a new Ticket for MuLearn Community
title: "[MuLearn Community]: "
labels: ["New Login Page"]
name: Mulearn Feature Request
description: Create a new Feature Request for MuLearn Community
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the new feature you are suggesting.
- type: textarea
id: ticket-description
id: description
validations:
required: true
attributes:
label: Ticket Contents
value: |
## Description
[Provide a brief description of the feature, including why it is needed and what it will accomplish.]
label: Description
placeholder: |
A button in the screen X that allows to do Y
- type: textarea
id: ticket-goals
id: goals
validations:
required: true
attributes:
label: Goals
description: List the goals of the feature.
value: |
## Goals
- [ ] Goal 1
- [ ] Goal 2
- [ ] Goal 3
- type: textarea
id: ticket-expected-outcome
attributes:
label: Expected Outcome
description: Describe in detail what the final product or result should look like and how it should behave.

- type: textarea
id: ticket-acceptance-criteria
attributes:
label: Acceptance Criteria
description: List the acceptance criteria for this feature.
placeholder: |
- Goal 1
- Goal 2
- type: textarea
id: ticket-implementation-details
id: implementation-details
validations:
required: true
attributes:
label: Implementation Details
description: List any technical details about the proposed implementation, including any specific technologies that will be used.

- type: textarea
id: ticket-mockups
attributes:
label: Mockups/Wireframes
description: Include links to any visual aids, mockups, wireframes, or diagrams that help illustrate what the final product should look like. This is not always necessary, but can be very helpful in many cases.

- type: input
id: ticket-product
attributes:
label: Product Name
placeholder: Enter Product Name
validations:
required: true

- type: input
id: ticket-governance-domain
attributes:
label: Domain
placeholder: Enter Area of Governance
placeholder: |
- Implementation Detail 1
- Implementation Detail 2
- also add images is possible
- type: dropdown
id: ticket-technical-skills-required
id: skills-required
attributes:
label: Tech Skills Needed
description: Select the technologies needed for this ticket (use Ctrl or Command to select multiple)
Expand Down Expand Up @@ -163,6 +136,8 @@ body:
attributes:
label: Mentor(s)
description: Please tag relevant mentors for the ticket
placeholder: |
@Jenin82
validations:
required: true

Expand All @@ -180,21 +155,22 @@ body:
required: true

- type: dropdown
id: ticket-category
id: category
attributes:
label: Category
description: Choose the categories that best describe your ticket
multiple: true
options:
- API
- Analytics
- Accessibility
- Backend
- Database
- Documentation
- Delpoyment
- Frontend
- Testing
- Bot
- UI
- UX
- Other
validations:
required: true
Expand Down
36 changes: 0 additions & 36 deletions .github/ISSUE_TEMPLATE/new-feature.yml

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ import DiscordModeration from "./modules/Dashboard/modules/DiscordModeration/Dis
import Test from "./modules/Dashboard/modules/Test/Test";
import Analytics from "./modules/Dashboard/modules/UrlShortener/Pages/Analytics";
import Donation from "./modules/Public/Donation/Donation";
import DonationTest from "./modules/Public/Donation/pages/Donate";
import Refund from "./modules/Public/Donation/pages/Refund";


const Profile = lazy(
() => import("./modules/Dashboard/modules/Profile/pages/Profile")
);
Expand Down Expand Up @@ -266,6 +270,14 @@ function App() {
path: "donation",
element: <Donation />
},
{
path: "donation-test",
element: <DonationTest />
},
{
path: "donation/refund",
element: <Refund />
},
{
path: "/",
element: <AuthRoutes />,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Dashboard/modules/ManageUsers/UserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type InitialLocationData = {
state: { label: string; value: string };
district: { label: string; value: string };
} | null;
const requiredFields = ["full_name", "email", "mobile"];
const requiredFields = ["full_name", "email"];
const UserForm = forwardRef(
(props: Props & { closeModal: () => void }, ref: any) => {
const [initialData, setInitialData] =
Expand Down
7 changes: 6 additions & 1 deletion src/modules/Dashboard/modules/Wadhwani/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ import {
} from "./services/api";
import toast from "react-hot-toast";
import styles from "./index.module.css";
import MuLoader from "@/MuLearnComponents/MuLoader/MuLoader";


const Wadhwani = () => {
const [data, setData] = useState<wadhwaniCourseResponse[]>([]);
const [clientToken, setClientToken] = useState("");
const [isLoading,setIsLoading]=useState(true)

useEffect(() => {
fetchData();
Expand All @@ -29,6 +32,7 @@ const Wadhwani = () => {
} else if (courses) {
setData(courses);
}
setIsLoading(false)
}
};

Expand All @@ -48,7 +52,8 @@ const Wadhwani = () => {
<div className={styles.wrapper}>
<h1>Wadhwani Foundation Courses</h1>
<div className={styles.container}>
{data.map(course => (
{isLoading?<MuLoader/>:
data.map(course => (
<div
key={course.courseId}
className={styles.card}
Expand Down
9 changes: 7 additions & 2 deletions src/modules/Dashboard/modules/Wadhwani/services/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { privateGateway } from "@/MuLearnServices/apiGateways";
import { dashboardRoutes } from "@/MuLearnServices/urls";
import { AxiosError } from "axios";

import toast from "react-hot-toast";
export const getWadhwaniClientToken = async () => {
try {
const response = await privateGateway.post(
Expand Down Expand Up @@ -47,6 +47,7 @@ export const getWadhwaniCourseLink = async (
clientToken: string,
courseId: string
) => {
const toastId=toast.loading("Fetching course link...")
try {
const response = await privateGateway.post(
dashboardRoutes.getWadhwaniCourseLink,
Expand All @@ -61,12 +62,16 @@ export const getWadhwaniCourseLink = async (
const message: wadhwaniCourseRedirectResponse = response?.data?.response;
if (message.data?.error?.code) {
return { response: null, error: message.data.error.description };
}else{
toast.success("Course link opened successfully!",{id:toastId})
}
return { response: message, error: null };
} catch (err: unknown) {
} catch (err: unknown) {
toast.error("Please try again later.",{id:toastId})
const error = err as AxiosError;
if (error?.response) {
throw error;

} else {
return { response: null, error: error.message };
}
Expand Down
Binary file added src/modules/Public/Donation/assets/LC3.webp
Binary file not shown.
Binary file added src/modules/Public/Donation/assets/µ.webp
Binary file not shown.
Binary file added src/modules/Public/Donation/assets/µLearn.webp
Binary file not shown.
Loading

0 comments on commit dd94de0

Please sign in to comment.