Browse Source

fix task store not being marked stale.

main
Gisle Aune 4 years ago
parent
commit
55c1ead637
  1. 3
      svelte-ui/src/forms/ItemEditForm.svelte
  2. 5
      svelte-ui/src/forms/LogAddForm.svelte
  3. 3
      svelte-ui/src/forms/LogDeleteForm.svelte
  4. 3
      svelte-ui/src/forms/LogEditForm.svelte
  5. 3
      svelte-ui/src/forms/TaskAddForm.svelte
  6. 5
      svelte-ui/src/forms/TaskDeleteForm.svelte
  7. 5
      svelte-ui/src/forms/TaskEditForm.svelte

3
svelte-ui/src/forms/ItemEditForm.svelte

@ -5,6 +5,7 @@
import goalStore, { fpGoalStore } from "../stores/goal"; import goalStore, { fpGoalStore } from "../stores/goal";
import groupStore from "../stores/group"; import groupStore from "../stores/group";
import projectStore, { fpProjectStore } from "../stores/project"; import projectStore, { fpProjectStore } from "../stores/project";
import taskStore, { fpTaskStore } from "../stores/tasks";
const md = $modalStore; const md = $modalStore;
if (md.name !== "item.edit") { if (md.name !== "item.edit") {
@ -30,6 +31,8 @@
fpGoalStore.markStale(); fpGoalStore.markStale();
projectStore.markStale(); projectStore.markStale();
fpProjectStore.markStale(); fpProjectStore.markStale();
taskStore.markStale();
fpTaskStore.markStale();
modalStore.close(); modalStore.close();
}).finally(() => { }).finally(() => {
loading = false; loading = false;

5
svelte-ui/src/forms/LogAddForm.svelte

@ -3,9 +3,10 @@
import Checkbox from "../components/Checkbox.svelte"; import Checkbox from "../components/Checkbox.svelte";
import Modal from "../components/Modal.svelte"; import Modal from "../components/Modal.svelte";
import goalStore, { fpGoalStore } from "../stores/goal"; import goalStore, { fpGoalStore } from "../stores/goal";
import logStore from "../stores/logs";
import logStore from "../stores/logs";
import modalStore from "../stores/modal"; import modalStore from "../stores/modal";
import projectStore, { fpProjectStore } from "../stores/project"; import projectStore, { fpProjectStore } from "../stores/project";
import taskStore, { fpTaskStore } from "../stores/tasks";
import { formatFormTime } from "../utils/time"; import { formatFormTime } from "../utils/time";
const md = $modalStore; const md = $modalStore;
@ -38,6 +39,8 @@ import logStore from "../stores/logs";
fpProjectStore.markStale(); fpProjectStore.markStale();
goalStore.markStale(); goalStore.markStale();
fpGoalStore.markStale(); fpGoalStore.markStale();
taskStore.markStale();
fpTaskStore.markStale();
logStore.markStale(); logStore.markStale();
}).finally(() => { }).finally(() => {
loading = false; loading = false;

3
svelte-ui/src/forms/LogDeleteForm.svelte

@ -6,6 +6,7 @@
import projectStore, { fpProjectStore } from "../stores/project"; import projectStore, { fpProjectStore } from "../stores/project";
import { formatFormTime } from "../utils/time"; import { formatFormTime } from "../utils/time";
import logStore from "../stores/logs"; import logStore from "../stores/logs";
import taskStore, { fpTaskStore } from "../stores/tasks";
const md = $modalStore; const md = $modalStore;
if (md.name !== "log.delete") { if (md.name !== "log.delete") {
@ -31,6 +32,8 @@
goalStore.markStale(); goalStore.markStale();
fpGoalStore.markStale(); fpGoalStore.markStale();
logStore.markStale(); logStore.markStale();
taskStore.markStale();
fpTaskStore.markStale();
modalStore.close(); modalStore.close();
}).finally(() => { }).finally(() => {

3
svelte-ui/src/forms/LogEditForm.svelte

@ -6,6 +6,7 @@
import projectStore, { fpProjectStore } from "../stores/project"; import projectStore, { fpProjectStore } from "../stores/project";
import { formatFormTime } from "../utils/time"; import { formatFormTime } from "../utils/time";
import logStore from "../stores/logs"; import logStore from "../stores/logs";
import taskStore, { fpTaskStore } from "../stores/tasks";
const md = $modalStore; const md = $modalStore;
if (md.name !== "log.edit") { if (md.name !== "log.edit") {
@ -33,6 +34,8 @@
fpProjectStore.markStale(); fpProjectStore.markStale();
goalStore.markStale(); goalStore.markStale();
fpGoalStore.markStale(); fpGoalStore.markStale();
taskStore.markStale();
fpTaskStore.markStale();
logStore.markStale(); logStore.markStale();
modalStore.close(); modalStore.close();

3
svelte-ui/src/forms/TaskAddForm.svelte

@ -5,6 +5,7 @@
import type { ProjectResult } from "../models/project"; import type { ProjectResult } from "../models/project";
import modalStore from "../stores/modal"; import modalStore from "../stores/modal";
import projectStore, { fpProjectStore } from "../stores/project"; import projectStore, { fpProjectStore } from "../stores/project";
import taskStore, { fpTaskStore } from "../stores/tasks";
let project: ProjectResult let project: ProjectResult
let endTime = ""; let endTime = "";
@ -28,6 +29,8 @@
}).then(() => { }).then(() => {
projectStore.markStale(); projectStore.markStale();
fpProjectStore.markStale(); fpProjectStore.markStale();
taskStore.markStale();
fpTaskStore.markStale();
modalStore.close(); modalStore.close();
}).catch(err => { }).catch(err => {
error = err.message ? err.message : err.toString(); error = err.message ? err.message : err.toString();

5
svelte-ui/src/forms/TaskDeleteForm.svelte

@ -1,10 +1,11 @@
<script lang="ts"> <script lang="ts">
import stuffLogClient from "../clients/stufflog"; import stuffLogClient from "../clients/stufflog";
import Checkbox from "../components/Checkbox.svelte";
import Checkbox from "../components/Checkbox.svelte";
import Modal from "../components/Modal.svelte"; import Modal from "../components/Modal.svelte";
import goalStore, { fpGoalStore } from "../stores/goal"; import goalStore, { fpGoalStore } from "../stores/goal";
import modalStore from "../stores/modal"; import modalStore from "../stores/modal";
import projectStore, { fpProjectStore } from "../stores/project"; import projectStore, { fpProjectStore } from "../stores/project";
import taskStore, { fpTaskStore } from "../stores/tasks";
import { formatFormTime } from "../utils/time"; import { formatFormTime } from "../utils/time";
const md = $modalStore; const md = $modalStore;
@ -29,6 +30,8 @@ import Checkbox from "../components/Checkbox.svelte";
fpProjectStore.markStale(); fpProjectStore.markStale();
goalStore.markStale(); goalStore.markStale();
fpGoalStore.markStale(); fpGoalStore.markStale();
taskStore.markStale();
fpTaskStore.markStale();
modalStore.close(); modalStore.close();
}).catch(err => { }).catch(err => {
error = err.message ? err.message : err.toString(); error = err.message ? err.message : err.toString();

5
svelte-ui/src/forms/TaskEditForm.svelte

@ -1,10 +1,11 @@
<script lang="ts"> <script lang="ts">
import stuffLogClient from "../clients/stufflog"; import stuffLogClient from "../clients/stufflog";
import Checkbox from "../components/Checkbox.svelte";
import Checkbox from "../components/Checkbox.svelte";
import Modal from "../components/Modal.svelte"; import Modal from "../components/Modal.svelte";
import goalStore, { fpGoalStore } from "../stores/goal"; import goalStore, { fpGoalStore } from "../stores/goal";
import modalStore from "../stores/modal"; import modalStore from "../stores/modal";
import projectStore, { fpProjectStore } from "../stores/project"; import projectStore, { fpProjectStore } from "../stores/project";
import taskStore, { fpTaskStore } from "../stores/tasks";
import { formatFormTime } from "../utils/time"; import { formatFormTime } from "../utils/time";
const md = $modalStore; const md = $modalStore;
@ -35,6 +36,8 @@ import Checkbox from "../components/Checkbox.svelte";
fpProjectStore.markStale(); fpProjectStore.markStale();
goalStore.markStale(); goalStore.markStale();
fpGoalStore.markStale(); fpGoalStore.markStale();
taskStore.markStale();
fpTaskStore.markStale();
modalStore.close(); modalStore.close();
}).catch(err => { }).catch(err => {
error = err.message ? err.message : err.toString(); error = err.message ? err.message : err.toString();

Loading…
Cancel
Save