Merge branch 'main' of git.targo.ca:Targo/targo_frontend into dev/nicolas/staging-prep
This commit is contained in:
commit
9c82319298
34
Dockerfile
34
Dockerfile
|
|
@ -1,28 +1,20 @@
|
|||
# targo-frontend
|
||||
FROM node:22
|
||||
|
||||
# Set working directory inside container
|
||||
# Step 1 - Building the app
|
||||
FROM node:22 AS build
|
||||
WORKDIR /app
|
||||
|
||||
# Adding Quasar
|
||||
RUN yarn global add @quasar/cli
|
||||
|
||||
COPY package*.json ./
|
||||
# Set environment variables
|
||||
ARG BACKEND_URL
|
||||
ENV VITE_TARGO_BACKEND_URL=$BACKEND_URL
|
||||
|
||||
# Copy the code
|
||||
COPY . .
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install -g @quasar/cli
|
||||
COPY . .
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
# Linting and formating
|
||||
RUN yarn
|
||||
RUN yarn lint
|
||||
|
||||
# Expose Quasar dev port
|
||||
EXPOSE 9000
|
||||
|
||||
# Default command
|
||||
CMD ["npm", "run", "dev"]
|
||||
# Step 2 - Move Applicatin to Nginx
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/dist/spa /usr/share/nginx/html
|
||||
RUN mkdir /usr/share/nginx/html/src
|
||||
COPY --from=build /app/src /usr/share/nginx/html/src
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
|
@ -23,4 +23,4 @@ services:
|
|||
env_file:
|
||||
- stack.env
|
||||
ports:
|
||||
- ${FRONTEND_PUBLIC_PORT}:9000
|
||||
- ${FRONTEND_PUBLIC_PORT}:80
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
<script
|
||||
setup
|
||||
lang="ts"
|
||||
>
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useTimesheetStore } from 'src/stores/timesheet-store';
|
||||
import { TimesheetApprovalCSVReportFilters } from 'src/modules/timesheet-approval/models/timesheet-approval-csv-report.models';
|
||||
|
||||
const timesheet_store = useTimesheetStore();
|
||||
const report_filter_options = ref<TimesheetApprovalCSVReportFilters>(new TimesheetApprovalCSVReportFilters);
|
||||
const selected_company = ref<'targo' | 'solucom'>('targo');
|
||||
|
||||
const selected_report_filters = ref<(keyof TimesheetApprovalCSVReportFilters)[]>(
|
||||
Object.entries(report_filter_options.value).filter(([_key, value]) => value).map(([key]) => key as keyof TimesheetApprovalCSVReportFilters)
|
||||
|
|
@ -68,6 +66,12 @@
|
|||
report_filter_options.value[typed_key] = new_values.includes(key as keyof TimesheetApprovalCSVReportFilters);
|
||||
});
|
||||
});
|
||||
|
||||
watch(selected_company, (company) => {
|
||||
report_filter_options.value.targo = company === 'targo';
|
||||
report_filter_options.value.solucom = company === 'solucom';
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -77,7 +81,8 @@
|
|||
:style="$q.dark.isActive ? 'border: 2px solid var(--q-accent)' : ''"
|
||||
>
|
||||
<!-- main header -->
|
||||
<div class="col-auto bg-primary text-accent text-weight-bolder text-center text-uppercase text-h6 q-py-xs z-top">
|
||||
<div
|
||||
class="col-auto bg-primary text-accent text-weight-bolder text-center text-uppercase text-h6 q-py-xs z-top">
|
||||
{{ $t('timesheet_approvals.print_report.title') }}
|
||||
</div>
|
||||
|
||||
|
|
@ -106,17 +111,17 @@
|
|||
:key="index"
|
||||
class="q-pa-xs col-6"
|
||||
>
|
||||
<q-checkbox
|
||||
v-model="selected_report_filters"
|
||||
<q-radio
|
||||
v-model="selected_company"
|
||||
left-label
|
||||
color="white"
|
||||
dense
|
||||
:label="$t(company.label)"
|
||||
:val="company.value"
|
||||
checked-icon="download"
|
||||
unchecked-icon="highlight_off"
|
||||
checked-icon="radio_button_checked"
|
||||
unchecked-icon="radio_button_unchecked"
|
||||
class="q-px-md q-py-xs shadow-4 rounded-25 full-width"
|
||||
:class="selected_report_filters.includes(company.value) ? 'bg-accent text-white text-bold' : 'bg-dark'"
|
||||
:class="selected_company.includes(company.value) ? 'bg-accent text-white text-bold' : 'bg-dark'"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -139,8 +144,8 @@
|
|||
color="white"
|
||||
dense
|
||||
:val="type.value"
|
||||
checked-icon="download"
|
||||
unchecked-icon="highlight_off"
|
||||
checked-icon="check_box"
|
||||
unchecked-icon="check_box_outline_blank"
|
||||
:label="$t(type.label)"
|
||||
class="q-px-md q-py-xs shadow-4 rounded-25 full-width"
|
||||
:class="selected_report_filters.includes(type.value) ? 'bg-accent text-white text-bold' : 'bg-white text-primary'"
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ export class TimesheetApprovalCSVReportFilters {
|
|||
constructor() {
|
||||
this.shifts = true;
|
||||
this.expenses = true;
|
||||
this.holiday = false;
|
||||
this.vacation = false;
|
||||
this.holiday = true;
|
||||
this.vacation = true;
|
||||
this.targo = true;
|
||||
this.solucom = true;
|
||||
this.solucom = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user