Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/kitu/addWorkspace_page' …
Browse files Browse the repository at this point in the history
…into sudo
  • Loading branch information
yp969803 committed Jan 13, 2024
2 parents b51bbbe + 6b85e27 commit f534759
Show file tree
Hide file tree
Showing 11 changed files with 366 additions and 129 deletions.
16 changes: 8 additions & 8 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3.3'
services:
api:
build:
context: ./
dockerfile: local.Dockerfile
volumes:
- ./:/app
- ./.m2:/root/.m2
working_dir: /app
command: sh run.sh
build:
context: ./
dockerfile: local.Dockerfile
volumes:
- ./:/app
- ./.m2:/root/.m2
working_dir: /app
command: sh run.sh
16 changes: 5 additions & 11 deletions src/app/api/file.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
import axios, { AxiosResponse } from 'axios';
import { BACKEND_URL } from 'envConstants';


export interface FileUpload{

message: string,
isSuccessful: boolean,
statusCode: number,

export interface FileUpload {
message: string;
isSuccessful: boolean;
statusCode: number;
}




export const uploadIcon = async (
authorizationToken: string,
orgName: string,
file: File
):Promise<AxiosResponse<FileUpload>> => {
): Promise<AxiosResponse<FileUpload>> => {
const url = BACKEND_URL + '/api/protected/file/upload/' + orgName;
const formData = new FormData();
formData.append('file', file);
Expand Down
15 changes: 8 additions & 7 deletions src/app/api/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import axios from 'axios';
import { BACKEND_URL } from 'envConstants';
import { AxiosResponse } from 'axios';


export interface LoginData{
token: string,
username: string,
type: string,
id: number
export interface LoginData {
token: string;
username: string;
type: string;
id: number;
}

export const login = async (code: string):Promise<AxiosResponse<LoginData>> => {
export const login = async (
code: string
): Promise<AxiosResponse<LoginData>> => {
const url = BACKEND_URL + '/api/auth/login';
const respnse = await axios.post<LoginData>(
url,
Expand Down
15 changes: 8 additions & 7 deletions src/app/api/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ export interface organizationBody {
description: string;
}


export interface AllOrgs{
export interface AllOrgs {
organizations: {
id: number,
name: string,
description: string|null
}[]
id: number;
name: string;
description: string | null;
}[];
}

export interface Projects{
Expand Down Expand Up @@ -216,7 +215,9 @@ export const getOrg = async (authorizationToken: string, orgName: string) => {
return respnse;
};

export const getAllOrgs = async (authorizationToken: string): Promise<AxiosResponse<AllOrgs>> => {
export const getAllOrgs = async (
authorizationToken: string
): Promise<AxiosResponse<AllOrgs>> => {
const url = BACKEND_URL + '/api/protected/org/getAllOrg';
const respnse = await axios.get<AllOrgs>(url, {
headers: {
Expand Down
44 changes: 21 additions & 23 deletions src/app/api/user.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
import axios,{AxiosResponse} from 'axios';
import axios, { AxiosResponse } from 'axios';
import { BACKEND_URL } from 'envConstants';




export interface UserData{
message: string
export interface UserData {
message: string;
}



export interface AllUserData{
export interface AllUserData {
users: {
id: number,
username: string
}[]
id: number;
username: string;
}[];
}

export const getUser= async (authorizationToken: string):Promise<AxiosResponse<UserData>> => {
export const getUser = async (
authorizationToken: string
): Promise<AxiosResponse<UserData>> => {
const url = BACKEND_URL + '/api/protected/user/getUser';

const respnse = await axios.get<UserData>(url, {
headers: {
Accept: 'application/json',

Authorization: `Bearer ${authorizationToken}`,
},
});

return respnse;
const respnse = await axios.get<UserData>(url, {
headers: {
Accept: 'application/json',

Authorization: `Bearer ${authorizationToken}`,
},
});

return respnse;
};

export const getAllUser = async (authorizationToken: string):Promise<AxiosResponse<AllUserData>> => {
export const getAllUser = async (
authorizationToken: string
): Promise<AxiosResponse<AllUserData>> => {
const url = BACKEND_URL + '/api/protected/user/all';
const respnse = await axios.get<AllUserData>(url, {
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function App() {
<>
<Navbar />
<BasicRoutes />
<Toaster/>
<Toaster />
</>
);
}
Expand Down
3 changes: 0 additions & 3 deletions src/app/state/action-creators/usersActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ export const setAllUsernames = (usernames: string[]) => {
};
};




162 changes: 162 additions & 0 deletions src/features/AddWorkspace/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
$breakpoint-tablet: 768px;
.main_aworkspace_container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: max-content;
padding: 2rem;
.addworkspace-form-container {
background: linear-gradient(110.51deg, #141432 0.9%, #2a2a4b 101.51%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
padding: 2rem 1rem;
border-radius: 1.25rem;
gap: 2rem;
.submit {
display: flex;
padding: 1rem 2rem;
align-self: flex-end;
font-size: 1.5rem;
border-radius: 0.875rem;
background: #402aa4;
color: white;
outline: none;
border: none;
}
}

.single-form-element-container {
display: flex;
flex-direction: column;
gap: 1rem;
width: 100%;
.label {
color: #8181ff;
font-size: 1.5rem;
font-weight: 900;
}
}
}

.custom-input {
box-sizing: border-box;
border: 0.8px solid #402aa4;
border-radius: 14px;
background-color: transparent;
align-items: flex-start;
color: rgba(173, 173, 255, 0.75);
padding: 1.5rem 1rem;
font-size: 1.25rem;
font-family: 'Poppins';
outline: none;
}

.custom-input::placeholder {
color: rgba(173, 173, 255, 0.75);
font-family: Poppins;
font-size: 1.25rem;
font-weight: 100;
line-height: normal;
}

.file-input-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
max-width: 30rem;
padding: 2rem;
border-radius: 1.25rem;
background: linear-gradient(
138deg,
rgba(20, 20, 50, 0.7) 5.19%,
rgba(20, 20, 50, 0.7) 97.11%
);
backdrop-filter: blur(25px);

.custom-file-input {
visibility: hidden;
}
.file-label {
width: fit-content;
padding: 0.4375rem 0.5625rem;
border-radius: 1.75rem;
background: #402aa4;
color: white;
}
}

.add-member-container {
position: relative;
box-sizing: border-box;
border: 0.8px solid #402aa4;
border-radius: 14px;
display: flex;
flex-direction: row;
outline: #141432;
.custom-input {
display: flex;
width: 100%;
border: none;
outline: none;
}
button {
border: none;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.25rem;
margin: 0.75rem 1rem;
color: white;
width: 7rem;
font-weight: 100 !important;
border-radius: 2.3125rem;
background: #402aa4;
}
}

.added-members {
display: flex;
flex-direction: row;
gap: 2rem;
flex-wrap: wrap;
width: 100%;
.member-card {
display: inline-flex;
padding: 0.4375rem 0.875rem 0.625rem 0.875rem;
justify-content: center;
align-items: center;
gap: 0.5625rem;
color: #8989ce;
border-radius: 0.75rem;
background: #26264e;
.member-avatar {
width: 40px;
height: 40px;
}
.btn-cross {
appearance: none;
border: none;
display: flex;
justify-content: center;
align-items: center;
background-color: transparent;
}
}
}

@media (min-width: $breakpoint-tablet) {
.main_aworkspace_container {
padding: 2rem 5rem;
.addworkspace-form-container {
padding: 2rem 5rem;
}
}
}
Loading

0 comments on commit f534759

Please sign in to comment.