working on timetracking module
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
}
|
||||
|
||||
async function loadTimes(projectId){
|
||||
const url = api('times/list');
|
||||
const url = api('time/list');
|
||||
let data = { company_id: company_id, project_id: projectId };
|
||||
const resp = await fetch(url,{
|
||||
credentials : 'include',
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { api } from '../../urls.svelte.js';
|
||||
import { t } from '../../translations.svelte.js';
|
||||
|
||||
let error = $state(null);
|
||||
|
||||
async function loadTimes(){
|
||||
const url = api('time');
|
||||
const resp = await fetch(url,{credentials:'include'});
|
||||
if (resp.ok){
|
||||
} else {
|
||||
error = await resp.text();
|
||||
}
|
||||
}
|
||||
|
||||
onMount(loadTimes);
|
||||
</script>
|
||||
|
||||
<h1>{t('timetracking')}</h1>
|
||||
{#if error}
|
||||
<span class="error">{error}</span>
|
||||
{/if}
|
||||
Reference in New Issue
Block a user