Skip to content

Commit

Permalink
draft manage projects and consultants
Browse files Browse the repository at this point in the history
  • Loading branch information
valasek committed Sep 13, 2019
1 parent f516a41 commit 935656e
Show file tree
Hide file tree
Showing 23 changed files with 1,313 additions and 1,001 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright © 2018-2019 Stanislav Valasek <[email protected]>

# Accept the Go version for the image to be set as a build argument.
# Default to Go 1.12
ARG GO_VERSION=1.12
# Default to Go 1.13
ARG GO_VERSION=1.13

###########################################
# First stage: build the backend executable.
Expand Down Expand Up @@ -46,7 +46,7 @@ COPY ./server/ ./
# -installsuffix 'static' \
# -o /app .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build \
-ldflags "-X github.com/valasek/timesheet/server/version.Version=1.4.3" \
-ldflags "-X github.com/valasek/timesheet/server/version.Version=1.4.4" \
-installsuffix 'static' -o /timesheet.bin .
# RUN ls -la .

Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ REM Copyright © 2018-2019 Stanislav Valasek <[email protected]>

@ECHO OFF
set zip="C:\Program Files\7-Zip\7z.exe"
set version="1.4.3"
set version="1.4.4"
REM rem git describe --tags

if "%1" == "cloud" (
Expand Down
12 changes: 6 additions & 6 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "timesheet",
"version": "1.4.3",
"version": "1.4.4",
"description": "Self-hosted application to manage project reporting",
"productName": "Timesheet",
"cordovaId": "timesheet.simplesw.net",
Expand All @@ -20,21 +20,21 @@
"audit:lighthouse": "lighthouse http://localhost:3000 view --output-path=./test/lighthouse/reports/index.html --config-path=./test/lighthouse/configs/full-config.js"
},
"dependencies": {
"@quasar/extras": "^1.2.0",
"@quasar/extras": "^1.3.1",
"ajv": "^6.10.1",
"axios": "^0.19.0",
"chart.js": "^2.8.0",
"chartjs-plugin-datalabels": "^0.6.0",
"date-fns": "^2.0.0-beta.2",
"date-fns-tz": "^1.0.7",
"quasar": "^1.0.5",
"quasar": "^1.1.0",
"vue-chartjs": "^3.4.2"
},
"devDependencies": {
"@quasar/app": "^1.0.4",
"@quasar/app": "^1.0.6",
"@quasar/quasar-app-extension-icon-genie": "^1.0.1",
"@quasar/quasar-app-extension-qenv": "^1.0.0-beta.1",
"@quasar/quasar-app-extension-qmarkdown": "^1.0.0-beta.13",
"@quasar/quasar-app-extension-qenv": "^1.0.0-beta.2",
"@quasar/quasar-app-extension-qmarkdown": "^1.0.0-beta.19",
"@quasar/quasar-app-extension-testing-quality": "^1.0.0-beta.8",
"@vue/eslint-config-standard": "^4.0.0",
"babel-eslint": "^10.0.2",
Expand Down
2 changes: 1 addition & 1 deletion client/src/layouts/MyLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@click="drawer = !drawer"
>
</q-btn>
<img src="statics/logo.png" />
<img src="statics/logo-custom.png" />
<q-toolbar-title/>
<q-breadcrumbs class="q-pa-sm text-secondary absolute-center" active-color="white" style="font-size: 16px">
<template v-slot:separator>
Expand Down
158 changes: 127 additions & 31 deletions client/src/pages/Administration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,118 @@
<q-toolbar class="q-pa-md bg-primary text-secondary">
<q-toolbar-title>Administration & Settings</q-toolbar-title>
</q-toolbar>
<q-expansion-item
expand-separator
label="Manage Consultants & Projects">
<q-card>
<q-card-section>
<div class="row justify-around">
<div class="column">
<div class="column q-gutter-md">
<div class="row q-gutter-x-md">
<q-input :value="newConsultant" label="Consultant name"
class="body-1" style="width: 15em"/>
<q-btn color="primary" @click="addConsultant">Add Consultant</q-btn>
</div>
<div class="row q-gutter-x-md">
<q-table :columns="columnsConsultants" row-key="name" :data="consultants"
no-data-label="No consultants" :pagination.sync="consultantsPagination" :rows-per-page-options="[30,50,0]"
binary-state-sort bordered>
<template v-slot:body="props">
<q-tr :props="props">
<q-td key="name" :props="props">
{{ props.row.name }}
</q-td>
<q-td key="allocation" :props="props">
{{ props.row.allocation }}
</q-td>
<q-td key="actions" :props="props" class="q-gutter-x-sm">
<q-icon name="person_add" small color="green" size="1.5em" @click="deleteItem(props.row)">
<q-tooltip>Disable</q-tooltip>
</q-icon>
<q-icon name="person_add_disabled" small color="orange" size="1.5em" @click="deleteItem(props.row)">
<q-tooltip>Disable</q-tooltip>
</q-icon>
<q-icon name="delete" small color="red" size="1.5em" @click="deleteItem(props.row)">
<q-tooltip>Delete</q-tooltip>
</q-icon>
</q-td>
</q-tr>
</template>
</q-table>
</div>
</div>
</div>
<div class="column q-gutter-md">
<div class="row q-gutter-x-md">
<q-input :value="newProject" label="Project name"
class="body-1" style="width: 15em"/>
<q-btn color="primary" @click="addProject">Add Project</q-btn>
</div>
<div class="row q-gutter-x-md">
<q-table :columns="columnsProjects" row-key="name" :data="projects"
no-data-label="No projects" :pagination.sync="projectsPagination" :rows-per-page-options="[30,50,0]"
binary-state-sort bordered>
<template v-slot:body="props">
<q-tr :props="props">
<q-td key="name" :props="props">
{{ props.row.name }}
</q-td>
<q-td key="allocation" :props="props">
{{ props.row.allocation }}
</q-td>
<q-td key="actions" :props="props" class="q-gutter-x-sm">
<q-icon name="person_add" small color="green" size="1.5em" @click="deleteItem(props.row)">
<q-tooltip>Disable</q-tooltip>
</q-icon>
<q-icon name="person_add_disabled" small color="orange" size="1.5em" @click="deleteItem(props.row)">
<q-tooltip>Disable</q-tooltip>
</q-icon>
<q-icon name="delete" small color="red" size="1.5em" @click="deleteItem(props.row)">
<q-tooltip>Delete</q-tooltip>
</q-icon>
</q-td>
</q-tr>
</template>
</q-table>
</div>
</div>
</div>
</q-card-section>
</q-card>
</q-expansion-item>
<q-separator />
<q-expansion-item
expand-separator
label="Backup & Restore">
<q-card>
<q-card-section>
<div class="font-italic">
You can download all data in csv format as a zip file. Demo data can be modified, production moved to another instance or exported data used for billing.<br>
You can upload modified zipped csv files. Use the same format as downloaded archive. Import will delete and replace all existing data.
</div>
<q-card-section>
<div class="row justify-left q-gutter-x-md">
<div class="column">
<q-btn color="primary" @click="download">
Download&nbsp;&nbsp;<q-icon name="cloud_download"></q-icon>
</q-btn>
</div>
<div class="column">
<q-uploader
label="Upload"
accept=".zip"
:url=uploaderUrl
auto-upload
style="max-width: 250px"
/>
</div>
</div>
</q-card-section>
</q-card-section>
</q-card>
</q-expansion-item>
<q-separator />
<q-expansion-item
expand-separator
label="Warning Limits">
Expand Down Expand Up @@ -129,37 +241,6 @@
</q-card>
</q-expansion-item>
<q-separator />
<q-expansion-item
expand-separator
label="Backup & Restore">
<q-card>
<q-card-section>
<div class="font-italic">
You can download all data in csv format as a zip file. Demo data can be modified, production moved to another instance or exported data used for billing.<br>
You can upload modified zipped csv files. Use the same format as downloaded archive. Import will delete and replace all existing data.
</div>
<q-card-section>
<div class="row justify-left q-gutter-x-md">
<div class="column">
<q-btn color="primary" @click="download">
Download&nbsp;&nbsp;<q-icon name="cloud_download"></q-icon>
</q-btn>
</div>
<div class="column">
<q-uploader
label="Upload"
accept=".zip"
:url=uploaderUrl
auto-upload
style="max-width: 250px"
/>
</div>
</div>
</q-card-section>
</q-card-section>
</q-card>
</q-expansion-item>
<q-separator />
<q-expansion-item
expand-separator
label="View Application Logs">
Expand Down Expand Up @@ -196,6 +277,19 @@ export default {
return {
// url="http://localhost:3000/api/upload/data"
uploaderUrl: process.env.ENV_APP_URL + ':' + process.env.ENV_SVR_PORT + '/api/upload/data',
newConsultant: '',
newProject: '',
columnsConsultants: [
{ name: 'name', label: 'Name', align: 'left', sortable: true, field: 'name', style: 'width: 20%' },
{ name: 'allocation', label: 'Allocation in %', align: 'left', sortable: true, field: 'allocation', style: 'width: 5%' },
{ name: 'actions', label: 'Action', align: 'left', sortable: true, field: 'action', style: 'width: 5%' }
],
columnsProjects: [
{ name: 'name', label: 'Name', align: 'left', sortable: true, field: 'name', style: 'width: 20%' },
{ name: 'rate', label: 'Default Rate', align: 'left', sortable: true, field: 'rate', style: 'width: 5%' }
],
consultanrsPagination: { 'rowsPerPage': 10, 'sortBy': 'name', 'descending': false },
projectsPagination: { 'rowsPerPage': 10, 'sortBy': 'name', 'descending': false },
hoursRules: [
(v) => !isNaN(parseFloat(v)) || 'Enter hours between 0 and 24',
(v) => (parseFloat(v) <= 24) || 'Enter number between 0 and 24',
Expand Down Expand Up @@ -239,6 +333,8 @@ export default {
isNonWorking: state => state.settings.isNonWorking,
rates: state => state.rates.all,
types: state => state.rates.types,
consultants: state => state.consultants.all,
projects: state => state.projects.all,
selectedMonth: state => state.settings.selectedMonth
})
},
Expand Down
Binary file modified client/src/statics/app-logo-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/apple-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/apple-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/apple-icon-167x167.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/apple-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/icon-384x384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/src/statics/icons/ms-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/statics/logo-custom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading

0 comments on commit 935656e

Please sign in to comment.