Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
- name: Create env file
run: |
touch .env
echo DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }} >> .env
echo DJANGO_DEBUG=${{ secrets.DJANGO_DEBUG }} >> .env
echo EMAIL=${{ secrets.EMAIL }} >> .env
echo EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }} >> .env
echo EMAIL_HOST=${{ secrets.EMAIL_HOST }} >> .env
echo REDIS_HOST=${{ secrets.REDIS_HOST}} >> .env
echo SERVER_DOMAIN_NAME=${{ secrets.SERVER_DOMAIN_NAME }} >> .env
echo CLIENT_DOMAIN_NAME=${{ secrets.CLIENT_DOMAIN_NAME }} >> .env
echo CSHR_DJANGO_SECRET_KEY=${{ secrets.CSHR_DJANGO_SECRET_KEY }} >> .env
echo CSHR_DJANGO_DEBUG=${{ secrets.CSHR_DJANGO_DEBUG }} >> .env
echo CSHR_EMAIL=${{ secrets.CSHR_EMAIL }} >> .env
echo CSHR_EMAIL_PASSWORD=${{ secrets.CSHR_EMAIL_PASSWORD }} >> .env
echo CSHR_EMAIL_HOST=${{ secrets.CSHR_EMAIL_HOST }} >> .env
echo CSHR_REDIS_HOST=${{ secrets.CSHR_REDIS_HOST}} >> .env
echo CSHR_SERVER_DOMAIN_NAME=${{ secrets.CSHR_SERVER_DOMAIN_NAME }} >> .env
echo CSHR_CLIENT_DOMAIN_NAME=${{ secrets.CSHR_CLIENT_DOMAIN_NAME }} >> .env
cat .env
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ celerybeat.pid
.venv
env/
venv/
ENV/
CSHR_ENV/
env.bak/
venv.bak/

Expand Down
4 changes: 2 additions & 2 deletions client/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ interface ImportMetaEnv {
VITE_TITLE: string
VITE_FAVICON: string
VITE_LOGO: string
SERVER_DOMAIN_NAME_API: string
SERVER_DOMAIN_NAME_WS: string
CSHR_SERVER_DOMAIN_NAME_API: string
CSHR_SERVER_DOMAIN_NAME_WS: string
}
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@
"vite-plugin-vuetify": "^2.0.1",
"vitest": "^1.0.4",
"vue-tsc": "^1.8.25"
}
},
"packageManager": "[email protected]+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
}
8 changes: 4 additions & 4 deletions client/public/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
window.env = {
// SERVER_DOMAIN_NAME_API: 'https://cshrserver.gent01.qa.grid.tf/api', // Added for testing, this is a staging API
// SERVER_DOMAIN_NAME_WS: 'wss://cshrserver.gent01.qa.grid.tf/ws/notification', // Added for testing, this is a staging API
SERVER_DOMAIN_NAME_API: 'http://127.0.0.1:8000/api', // Added for testing, this is the local server API
SERVER_DOMAIN_NAME_WS: 'ws://127.0.0.1:8000/ws/notification', // Added for testing, this is the local server API
// CSHR_SERVER_DOMAIN_NAME_API: 'https://cshrserver.gent01.qa.grid.tf/api', // Added for testing, this is a staging API
// CSHR_SERVER_DOMAIN_NAME_WS: 'wss://cshrserver.gent01.qa.grid.tf/ws/notification', // Added for testing, this is a staging API
CSHR_SERVER_DOMAIN_NAME_API: 'http://127.0.0.1:8000/api', // Added for testing, this is the local server API
CSHR_SERVER_DOMAIN_NAME_WS: 'ws://127.0.0.1:8000/ws/notification', // Added for testing, this is the local server API
};
7 changes: 7 additions & 0 deletions client/src/clients/api/vacations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ export class VacationsApi extends ApiClientBase {
})
}

async delete(id: number) {
ApiClientBase.assertUser()
return this.unwrap(() => this.$http.delete<any>(this.getUrl(`/${id}`)), {
transform: (d) => d.results
})
}

async requestToCancel(id: number) {
return this.unwrap(() => this.$http.put<any>(this.getUrl(`/request-to-cancel/${id}`)), {
transform: (d) => d.results
Expand Down
6 changes: 3 additions & 3 deletions client/src/clients/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import axios from 'axios'

import { ApiClient } from './api'

console.log(`API connected on: ${window.env.SERVER_DOMAIN_NAME_API}`);
console.log(`WS connected on: ${window.env.SERVER_DOMAIN_NAME_WS}`);
console.log(`API connected on: ${window.env.CSHR_SERVER_DOMAIN_NAME_API}`);
console.log(`WS connected on: ${window.env.CSHR_SERVER_DOMAIN_NAME_WS}`);

const accessToken = localStorage.getItem("access_token")
export const $api = new ApiClient({
$http: axios.create({
baseURL: window.env.SERVER_DOMAIN_NAME_API,
baseURL: window.env.CSHR_SERVER_DOMAIN_NAME_API,
headers: {
Authorization: `Bearer ${accessToken}`,
},
Expand Down
Loading
Loading