@campxdev/campx-web-utils 2.0.0-alpha.1 → 2.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/campx-web-utils",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.3",
4
4
  "author": "CampX",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -27,7 +27,7 @@
27
27
  "react-router-dom": "^6.24.0"
28
28
  },
29
29
  "dependencies": {
30
- "@campxdev/react-blueprint": "3.0.0-alpha.1",
30
+ "@campxdev/react-blueprint": "3.0.0-alpha.9",
31
31
  "@hookform/resolvers": "^2.9.10",
32
32
  "axios": "^1.7.2",
33
33
  "cookie-js": "^0.0.1",
@@ -11,6 +11,8 @@ import { ReactNode, useState } from 'react';
11
11
  import { ErrorBoundary as ReactErrorBoundary } from 'react-error-boundary';
12
12
  import { QueryErrorResetBoundary } from 'react-query';
13
13
  import { useLocation, useNavigate } from 'react-router-dom';
14
+
15
+ import { institutionCode, workspace } from '../../utils/constants';
14
16
  import { Login } from './Login';
15
17
 
16
18
  export type ErrorBoundaryProps = {
@@ -81,7 +83,9 @@ const UnAuth = () => {
81
83
  setModalOpen(true);
82
84
  } else {
83
85
  if (!sessionCookie) {
84
- navigate('/auth/login');
86
+ if (workspace === 'prospect-workspace') {
87
+ navigate(`${institutionCode}/ats/login`);
88
+ } else navigate('/auth/login');
85
89
  }
86
90
  }
87
91
  };
@@ -145,23 +145,23 @@ export const Login = ({ close }: { close: () => void }) => {
145
145
  };
146
146
 
147
147
  return (
148
- <div className="flex flex-col gap-4 justify-between items-center">
149
- <div className="h-9 w-48.8">
148
+ <div className="flex flex-col gap-8 justify-center items-center p-8">
149
+ <div className="flex items-center justify-center h-9 w-48">
150
150
  <Icons.CampxFullLogoIcon />
151
151
  </div>
152
- <div className="flex flex-col gap-2.5 justify-center items-center">
152
+ <div className="flex flex-col gap-4 w-full max-w-[400px]">
153
153
  <Controller
154
154
  control={control}
155
155
  render={({ field }: { field: any }) => {
156
156
  return (
157
157
  <TextField
158
158
  name="username"
159
- className="w-[400px]"
160
159
  placeholder="Enter Username or Email"
161
160
  onChange={field.onChange}
162
161
  label="Username or Email"
163
162
  error={!!errors.username}
164
163
  required
164
+ fullWidth
165
165
  />
166
166
  );
167
167
  }}
@@ -178,6 +178,7 @@ export const Login = ({ close }: { close: () => void }) => {
178
178
  label="Password"
179
179
  error={!!errors.password}
180
180
  required
181
+ fullWidth
181
182
  />
182
183
  );
183
184
  }}
@@ -187,10 +188,10 @@ export const Login = ({ close }: { close: () => void }) => {
187
188
  type="submit"
188
189
  color="primary"
189
190
  variant="default"
190
- className="w-[400px]"
191
191
  onClick={handleSubmit(onSubmit)}
192
192
  disabled={isLoading}
193
193
  loading={isLoading}
194
+ fullWidth
194
195
  >
195
196
  Login
196
197
  </Button>
@@ -12,6 +12,8 @@ export const workspaceApiMapping: Record<string, string> = {
12
12
  'faculty-workspace': '/faculty-api',
13
13
  'department-workspace': '/department-api',
14
14
  'academic-coordinator-workspace': '/academic-coordinator-api',
15
+ 'course-coordinator-workspace': '/course-coordinator-api',
16
+ 'classroom-coordinator-workspace': '/classroom-coordinator-api',
15
17
  'academic-admin-workspace': '/academic-admin-api',
16
18
  'hostel-admin-workspace': '/hostel-admin-api',
17
19
  'transport-coordinator-workspace': '/transport-coordinator-api',
@@ -20,4 +22,7 @@ export const workspaceApiMapping: Record<string, string> = {
20
22
  'fee-terminal': '/fee-terminal-api',
21
23
  'accounts-officer-workspace': 'accounts-officer-api',
22
24
  'finance-officer-workspace': 'finance-officer-api',
25
+ 'outreach-agent-workspace': 'outreach-agent-api',
26
+ 'prospect-workspace': 'prospect-api',
27
+ 'research-coordinator-workspace': 'research-coordinator-api',
23
28
  };