Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MitanOmar committed Nov 7, 2023
0 parents commit 48ede7d
Show file tree
Hide file tree
Showing 17 changed files with 1,604 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode
.vitepress/*
!.vitepress/config.mts
node_modules
42 changes: 42 additions & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { defineConfig } from 'vitepress'
const date = new Date;

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Timed",
description: "An Open Source Time Tracking App",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Docs', link: '/docs/' },
{ text: 'Contributors', link: '/contributors' },
],

sidebar: [
{
text: 'Tracking',
items: [
{ text: 'Activities', link: '/docs/tracking/activities' },
{ text: 'Attendances', link: '/docs/tracking/attendances' },
{ text: 'Timesheet', link: '/docs/tracking/timesheet' },
]
},
{
// text: 'Documentation',
items: [
{ text: 'Analysis', link: '/docs/analysis/' },
{ text: 'Statistics', link: '/docs/statistics/' },
{ text: 'Projects', link: '/docs/projects/' },
]
}
],
footer: {
message: 'Adfinis Timed is released under the <a href="https://github.com/adfinis/timed-frontend/blob/main/LICENSE">GNU AFFERO GENERAL PUBLIC LICENSE</a>.',
copyright: `Copyright © 2019-${date.getFullYear()} <a href="https://github.com/adfinis/timed-frontend">Adfinis Timed</a>`
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/adfinis/timed-frontend' }
]
}
})
49 changes: 49 additions & 0 deletions api-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
outline: deep
---

# Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:

```md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```

<script setup>
import { useData } from 'vitepress'

const { site, theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>

## More

Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
36 changes: 36 additions & 0 deletions components/contributors.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<template>
<div>
<VPTeamMembers size="small" :members="data.contributors.map(ghUserToMember)" />
</div>
</template>
<script setup lang="ts">
import { reactive, onMounted } from 'vue';
import { VPTeamMembers } from 'vitepress/theme'
interface GithubUser {
login: string;
avatar_url: string;
html_url: string;
contributions: number;
}
function ghUserToMember(user: GithubUser) {
return {
avatar: user.avatar_url,
name: user.login,
title: `${user.contributions} contributions`,
links: [
{ icon: 'github', link: user.html_url },
]
}
}
const data = reactive({
contributors: [] as GithubUser[],
});
onMounted(async () => {
const users: GithubUser[] = await (await fetch('https://api.github.com/repos/adfinis/timed-frontend/contributors')).json();
data.contributors = users;
});
</script>
70 changes: 70 additions & 0 deletions components/liveLogo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<template>
<div class="clock-container" style="display: none;">
<svg class="timed-clock" viewBox="0 0 512 512" width="100%" height="100%">
<circle class="circle" r="240" cx="256" cy="256" stroke-width="20" />
<line class="hour" x1="256" y1="144" x2="256" y2="288" stroke-width="30" stroke-linecap="round"
:transform="`rotate(${data.hours} 256 256)`" />
<line class="minute" x1="256" y1="80" x2="256" y2="288" stroke-width="20" stroke-linecap="round"
:transform="`rotate(${data.minutes} 256 256)`" />
<line class="second" x1="256" y1="64" x2="256" y2="288" stroke-width="20" stroke-linecap="round"
:transform="`rotate(${data.seconds} 256 256)`" />
</svg>
</div>
</template>
<script lang="ts" setup>
import { reactive, onMounted } from 'vue';
const data = reactive({
hours: 0,
minutes: 0,
seconds: 0,
});
updateClock();
onMounted(() => {
const imageContainer = document.querySelector('.image-container');
const timedClock = document.querySelector('.clock-container');
if (imageContainer && timedClock) {
imageContainer.innerHTML = timedClock.innerHTML;
}
updateClock();
setInterval(() => {
updateClock();
if (!imageContainer || !timedClock) return;
imageContainer.innerHTML = timedClock.innerHTML;
}, 1000);
});
function updateClock() {
const date = new Date;
data.seconds = date.getSeconds() * 6;
data.minutes = date.getMinutes() * 6 + data.seconds / 60;
data.hours = ((date.getHours() % 12) / 12) * 360 + data.minutes / 12;
}
</script>

<style>
.timed-clock {
--clock-size: 200px;
--clock-color: rgb(87, 87, 87);
--clock-color-secondary: rgb(217, 83, 79);
width: var(--clock-size);
height: var(--clock-size);
}
.circle {
fill: transparent;
stroke: var(--clock-color);
}
.hour {
stroke: var(--clock-color);
}
.minute {
stroke: var(--clock-color);
}
.second {
stroke: var(--clock-color-secondary);
}
</style>
7 changes: 7 additions & 0 deletions contributors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script setup>
import Contributors from './components/contributors.vue'
</script>
# Contributors

<Contributors />

8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Timed Documentation

Timed is the is the time recording app

since [Adfinis](https://adfinis.com) is a provider of services, all services provided must be logged precisely so that they can be invoiced to customers.

Timed app in Adfinis can be accessed via [https://timed.adfinis.com](https://timed.adfinis.com)

35 changes: 35 additions & 0 deletions docs/tracking/activities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Activities Tracking

## Activities bar

![Activities bar](/1.png)

With the activities Bar, you can start an activity, and in the end of the tasks and by the end of the day, you can generate a time sheet from the current activities

You don't need to provide any information about the task that you are working on, but later, to generate the timesheet, the customer, project, task are needed

Note: The tasks that you create via activities bar are not going to be included in your working time, you have to generate a timesheet to include it.


## Overview Benchmark

![Overview Benchmark](/2.png)


The `Overview Benchmark` Component is providing the information about the duration of each working time, you can check your progress virtually, and without needing to go deeply to the details

![Overview Benchmark](/3.png)

Those helper methods, will help you to navigate throw the dates, vie going to the next and previus days, or just opening the calendar, and selecting the date, and the `Overview Benchmark` component, will display the inforamtion about the selected date

and the first button in the left, is `Generate Magic Link`,

## Magic Link
![Magic Link](/4.png)

This is a great featuer for the team lead and the project manager
With the magic link, you can define the customer, project, and the task, and also the comment that you want the user to enter the task,

it's useful if you create a list of the task for your team, and then define for the user who is going to work with which task, and you can insert the magic link in the task, with just a click, the user can create the report of his work

for example: the current working of writing the documentation can be reported in: [https://timed.adfinis.com/reports?task=3610103](https://timed.adfinis.com/reports?task=3610103)
3 changes: 3 additions & 0 deletions docs/tracking/attendances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Attendances Tracking

This is Attendances Tracking
4 changes: 4 additions & 0 deletions docs/tracking/timesheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Timesheet Tracking


This is Timesheet Tracking
27 changes: 27 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home

hero:
name: "Timed"
text: "An Open Source Time Tracking App"
tagline: "Log your Working Activities, Attendances, Holidays"
image:
src: https://raw.githubusercontent.com/adfinis/timed-frontend/main/public/assets/logo.svg
actions:
- theme: brand
text: Documentation
link: /docs/

features:
- title: For Employees
details: You can report the working time, and register the activites that you ware doing in each day
- title: For Project Manager
details: You can track the activitis in your team, and check the activities of each member in your team
- title: For Adminstration
details: You can check duration of the work that happend for your customer, and generate reports about those activities
---
<TimedLiveClock />
<script setup>
import TimedLiveClock from './components/liveLogo.vue'
</script>
Loading

0 comments on commit 48ede7d

Please sign in to comment.