Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed name from rapp(Presence) to Emmie(Figures) in different places. #204

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Rapp Aanwezigheid
# Emmie Figures

## What the app does

This app is an extension for Rapp to find out if certain conditions influence the presence of users.
This app is an extension for Emmie to find out if certain conditions influence the presence of users.

## What the project uses

The project uses [vite-plugin-ssr](https://github.com/brillout/vite-plugin-ssr)
<!-- Authentication by wwwhisper []() -->

### Project setup

Expand Down
14 changes: 9 additions & 5 deletions env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
APP_NAME=RappPresence
APP_NAME=EmmieFigures
APP_ENV=local
APP_DEBUG=true
PORT=3003
VITE_APP_URL=http://localhost:3003
RAPP_REPORTS_URL=http://127.0.0.1:8000/api/reports-presence/2021-12-01/2021-12-31
PORT=3000
VITE_APP_URL=http://localhost:3000

GITHUB_ACTIONS_TOKEN=
EMMIE_REPORTS_URL=https://app.emmie.nl/api/reports-presence
EMMIE_STAGING_REPORTS_URL=https://staging.emmie.nl/api/reports-presence
EMMIE_LOCAL_REPORTS_URL=http://localhost:8000/api/reports-presence

WEATHER_API_BASE_URL=https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline
WEATHER_API_KEY=

GITHUB_ACTIONS_TOKEN=
ATLASSIAN_APP_PASSWORD=
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "module",
"name": "rapp-presence",
"name": "emmie-figures",
"scripts": {
"dev": "npm run server",
"prod": "npm run build && npm run server:prod",
Expand Down
1 change: 0 additions & 1 deletion src/constants.js

This file was deleted.

3 changes: 2 additions & 1 deletion src/pages/_default/PageShell.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NavBar title="Clientcloud Presence">
<NavBar :title="Application_Title">
<template #logo>
<Logo />
</template>
Expand All @@ -11,6 +11,7 @@
<script setup>
import NavBar from 'components/NavBar.vue';
import Logo from 'components/Logo.vue';
import {Application_Title} from 'services/constants';
</script>

<style>
Expand Down
7 changes: 3 additions & 4 deletions src/pages/_default/_default.page.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {renderToString} from '@vue/server-renderer';
import {escapeInject, dangerouslySkipEscape} from 'vite-plugin-ssr';
import {createApp} from './app';
import logoUrl from 'assets/favicon.svg';
import {Application_Description, Application_Title} from 'services/constants';

export {render};
// See https://vite-plugin-ssr.com/data-fetching
Expand All @@ -14,10 +15,8 @@ async function render(pageContext) {

// See https://vite-plugin-ssr.com/html-head
const {documentProps} = pageContext;
const title = (documentProps && documentProps.title) || 'Rapp Presence';
const desc =
(documentProps && documentProps.description) ||
'Scatter plot correlation different weather types and rapp client presence';
const title = (documentProps && documentProps.title) || Application_Title;
const desc = (documentProps && documentProps.description) || Application_Description;

const documentHtml = escapeInject`<!DOCTYPE html>
<html lang="en">
Expand Down
3 changes: 3 additions & 0 deletions src/services/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const IS_SSR = typeof document === 'undefined';
export const Application_Title = 'Emmie Figures';
export const Application_Description = 'Scatter plot correlation different weather types and Emmie presence';
4 changes: 2 additions & 2 deletions src/services/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const weatherApiError = 'something went wrong while fetching weatherData from Vi

/**
* Check for weather and report data on the server.
* If no data is present, fetches from Visual Crossing Weather and Rapp.
* If no data is present, fetches from Visual Crossing Weather and Emmie.
*/
export const deploy = async () => {
const weatherData = await weather();
Expand Down Expand Up @@ -68,7 +68,7 @@ const reports = async () => {
return reports;
} catch {
/** @type {{message: string, reportsForMonth: ReportData[]}} */
const reports = await getFromApi(getEnv('RAPP_REPORTS_URL') + `/${startDate}/${endDate}`);
const reports = await getFromApi(getEnv('EEMIE_REPORTS_URL') + `/${startDate}/${endDate}`);
await fs.writeFile('./data/reports.json', JSON.stringify(reports.reportsForMonth));
return reports.reportsForMonth;
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/env.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env node */

import {config} from 'dotenv';
import {IS_SSR} from '../constants.js';
import {IS_SSR} from './constants.js';

if (IS_SSR) {
config();
Expand Down