8 Commits

Author SHA1 Message Date
ef569ac3b1 Merge minor edits from development.
All checks were successful
Build BAB Application Deployment Artifact / build (push) Successful in 2m30s
2023-12-18 20:50:51 -05:00
9390b7035c Change interval to 1h. Create StatusTypes 2023-12-18 20:44:01 -05:00
ac1730401a Add a shortened displayName for boats for a better mobile experience 2023-12-18 20:23:17 -05:00
bc41b1a7a1 Add bordered logo
All checks were successful
Build BAB Application Deployment Artifact / build (push) Successful in 3m42s
2023-12-18 18:10:05 -05:00
ea566d4a42 Add docs folder and design of users
All checks were successful
Build BAB Application Deployment Artifact / build (push) Successful in 2m31s
2023-12-18 14:26:03 -05:00
573e327a0f Move hard-coded API settings to .env file 2023-12-03 08:51:01 -05:00
831e81e892 Update package.json 2023-12-03 08:19:57 -05:00
39a6ab5fcc New workflow steps to use version
All checks were successful
Build BAB Application Deployment Artifact / build (push) Successful in 3m9s
2023-12-02 23:19:02 -05:00
11 changed files with 10555 additions and 989 deletions

View File

@@ -23,8 +23,13 @@ jobs:
run: npm install -g @quasar/cli run: npm install -g @quasar/cli
- name: Build Project - name: Build Project
run: quasar build -m pwa run: quasar build -m pwa
# - name: Archive Production Artifact - name: Get Version Number
# uses: actions/upload-artifact@v2 id: get_version
# with: run: echo "::set-output name=VERSION::$(node -p "require('./package.json').version")"
# name: build-artifact - name: Create Tarball of Build
# path: dist/pwa run: tar -czvf build-${{ steps.get_version.outputs.VERSION }}.tar.gz dist/pwa
- name: Upload Tarball
uses: actions/upload-artifact@v3
with:
name: build-artifact-${{ steps.get_version.outputs.VERSION }}
path: build-${{ steps.get_version.outputs.VERSION }}.tar.gz

View File

@@ -0,0 +1,40 @@
# Users, Roles and Permissions
This is the design document for https://gitea.toal.ca/oys/bab-app/issues/11
## Backend Concepts
Utilizing the AppWrite backend provides us with some basic concepts we can use:
### Users, Groups, and Labels
#### Teams
Teams are AppWrite groups of users. Teams can be assigned roles, which can be assigned permissions. Teams "contain" users. A team has more permissions to manage it's members than labels, which are assigned / removed, rather than 'invited / left'.
#### Labels
Labels are AppWrite tags for users. Users have Labels as attributes. Like teams, labels can be used for Role / Permission mapping.
### Permissions
https://appwrite.io/docs/advanced/platform/permissions
Permissions are fine-grained access control for users and objects. They follow standard "CRUD" patterns.
## BAB Concepts
For teams, there will, to start, be the following:
- `staff` : Individuals with authority / responsibilities
- `maintenance` : Staff responsible for maintenance (eg: Boatswain)
- `admin`: Administrators of the program / application
- `school` : Members of the Sailing School (Instructors & Students)
- `student` role : A student in the school
- `instructor` role: An instructor in the school
- `bab` : Members of the BAB program
- `skipper` role: A member who has passed skipper certification
The following are the initial labels:
- TBD

9655
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -27,6 +27,7 @@
"@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0", "@typescript-eslint/parser": "^5.10.0",
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.2",
"dotenv": "^16.3.1",
"eslint": "^8.10.0", "eslint": "^8.10.0",
"eslint-config-prettier": "^8.1.0", "eslint-config-prettier": "^8.1.0",
"eslint-plugin-vue": "^9.0.0", "eslint-plugin-vue": "^9.0.0",
@@ -38,10 +39,11 @@
"workbox-expiration": "^7.0.0", "workbox-expiration": "^7.0.0",
"workbox-precaching": "^7.0.0", "workbox-precaching": "^7.0.0",
"workbox-routing": "^7.0.0", "workbox-routing": "^7.0.0",
"workbox-strategies": "^7.0.0" "workbox-strategies": "^7.0.0",
"yarn": "^1.22.21"
}, },
"engines": { "engines": {
"node": "^18 || ^16 || ^14.19", "node": "^20 || ^18 || ^16 || ^14.19",
"npm": ">= 6.13.4", "npm": ">= 6.13.4",
"yarn": ">= 1.21.1" "yarn": ">= 1.21.1"
} }

View File

@@ -48,6 +48,7 @@ module.exports = configure(function (/* ctx */) {
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build // Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
build: { build: {
env: require('dotenv').config({ path: '.env.local' }).parsed,
target: { target: {
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'], browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
node: 'node16', node: 'node16',

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -14,8 +14,8 @@ const client = new Client();
// Private self-hosted appwrite // Private self-hosted appwrite
client client
.setEndpoint('https://apidev.bab.toal.ca/v1') .setEndpoint(process.env.APPWRITE_API_ENDPOINT)
.setProject('655a7116479b4d5a815f'); .setProject(process.env.APPWRITE_API_PROJECT);
//TODO //TODO
const appDatabaseId = ''; const appDatabaseId = '';

View File

@@ -55,11 +55,13 @@
v-model="selectedDate" v-model="selectedDate"
:model-resources="boatStore.boats" :model-resources="boatStore.boats"
resource-key="id" resource-key="id"
resource-label="name" resource-label="displayName"
:interval-start="12" resource-width="32"
:interval-count="36" :interval-start="6"
:interval-minutes="30" :interval-count="18"
:interval-minutes="60"
cell-width="48" cell-width="48"
style="--calendar-resources-width: 48px"
resource-min-height="40" resource-min-height="40"
animated animated
bordered bordered
@@ -79,8 +81,8 @@
</template> </template>
<template #resource-label="{ scope: { resource } }"> <template #resource-label="{ scope: { resource } }">
<div class="col-12"> <div class="col-12 .col-md-auto">
{{ resource.name }} {{ resource.displayName }}
<q-icon v-if="resource.defects" name="warning" color="warning" /> <q-icon v-if="resource.defects" name="warning" color="warning" />
</div> </div>
</template> </template>
@@ -98,7 +100,6 @@
><template v-slot:append><q-icon name="timelapse" /></template></q-select ><template v-slot:append><q-icon name="timelapse" /></template></q-select
></q-card-section> ></q-card-section>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import { import {
@@ -114,6 +115,7 @@ import { Boat, useBoatStore } from 'src/stores/boat';
import { useScheduleStore } from 'src/stores/schedule'; import { useScheduleStore } from 'src/stores/schedule';
import { date } from 'quasar'; import { date } from 'quasar';
import { computed } from 'vue'; import { computed } from 'vue';
import type { StatusTypes } from 'src/stores/schedule';
const durations = [1, 1.5, 2, 2.5, 3, 3.5, 4]; const durations = [1, 1.5, 2, 2.5, 3, 3.5, 4];
@@ -179,7 +181,7 @@ function getStyle(event: {
left: number; left: number;
width: number; width: number;
title: string; title: string;
status: 'tentative' | 'confirmed' | 'pending'; status: StatusTypes;
}) { }) {
return { return {
position: 'absolute', position: 'absolute',

View File

@@ -5,6 +5,7 @@ import { defineStore } from 'pinia';
export interface Boat { export interface Boat {
id: number; id: number;
name: string; name: string;
displayName?: string;
class?: string; class?: string;
year?: number; year?: number;
imgsrc?: string; imgsrc?: string;
@@ -27,6 +28,7 @@ const getSampleData = () => [
{ {
id: 1, id: 1,
name: 'ProjectX', name: 'ProjectX',
displayName: 'PX',
class: 'J/27', class: 'J/27',
year: 1981, year: 1981,
imgsrc: '/tmpimg/j27.png', imgsrc: '/tmpimg/j27.png',
@@ -52,6 +54,7 @@ and rough engine performance.`,
{ {
id: 2, id: 2,
name: 'Take5', name: 'Take5',
displayName: 'T5',
class: 'J/27', class: 'J/27',
year: 1985, year: 1985,
imgsrc: '/tmpimg/j27.png', imgsrc: '/tmpimg/j27.png',
@@ -60,6 +63,7 @@ and rough engine performance.`,
{ {
id: 3, id: 3,
name: 'WeeBeestie', name: 'WeeBeestie',
displayName: 'WB',
class: 'Capri 25', class: 'Capri 25',
year: 1989, year: 1989,
imgsrc: '/tmpimg/capri25.png', imgsrc: '/tmpimg/capri25.png',

View File

@@ -4,6 +4,7 @@ import { Boat, useBoatStore } from './boat';
import { date } from 'quasar'; import { date } from 'quasar';
import { DateOptions } from 'quasar'; import { DateOptions } from 'quasar';
export type StatusTypes = 'tentative' | 'confirmed' | 'pending' | undefined;
export interface Reservation { export interface Reservation {
id: number; id: number;
user: string; user: string;
@@ -11,7 +12,7 @@ export interface Reservation {
end: Date; end: Date;
resource: Boat; resource: Boat;
reservationDate: Date; reservationDate: Date;
status?: string; status?: StatusTypes;
} }
function getSampleData(): Reservation[] { function getSampleData(): Reservation[] {

1798
yarn.lock

File diff suppressed because it is too large Load Diff