Skip to content

Commit

Permalink
Remove noisy leftovers from #191 (#193)
Browse files Browse the repository at this point in the history
* remove console.logs

* remove unused leave date options in course planning store
  • Loading branch information
jxjj authored Aug 29, 2024
1 parent 3ad8a32 commit f56c1ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ export const useCoursePlanningStore = defineStore("coursePlanning", () => {

setFiltersFromQueryString(parsedQuery: ReturnType<typeof qs.parse>) {
const updatedFilters: T.CoursePlanningFilters = { ...state.filters };
console.log("parsed query", parsedQuery);

if (parsedQuery.inPlanningMode) {
updatedFilters.inPlanningMode = parsedQuery.inPlanningMode === "true";
Expand Down Expand Up @@ -457,8 +456,6 @@ export const useCoursePlanningStore = defineStore("coursePlanning", () => {
}

state.filters = updatedFilters;

console.log("parsed query", { parsedQuery, filters: updatedFilters });
},
};

Expand Down
16 changes: 1 addition & 15 deletions resources/js/pages/CoursePlanningPage/stores/useLeaveStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ import { groupBy, keyBy } from "lodash";
interface LeaveStoreState {
activeGroupId: T.Group["id"] | null;
leaveLookup: Record<T.Leave["id"], T.Leave>;
startDateOptions: T.ApiLeaveDateOptions["startDateOptions"];
endDateOptions: T.ApiLeaveDateOptions["endDateOptions"];
}

export const useLeaveStore = defineStore("leave", () => {
const state = reactive<LeaveStoreState>({
activeGroupId: null,
leaveLookup: {},
startDateOptions: [],
endDateOptions: [],
});

const getters = {
Expand Down Expand Up @@ -51,10 +47,7 @@ export const useLeaveStore = defineStore("leave", () => {
const actions = {
init(groupId: T.Group["id"]) {
state.activeGroupId = groupId;
return Promise.all([
actions.fetchLeaves(),
actions.fetchLeaveDateOptions(),
]);
return Promise.all([actions.fetchLeaves()]);
},

async fetchLeaves() {
Expand All @@ -64,13 +57,6 @@ export const useLeaveStore = defineStore("leave", () => {
const leaves = await api.fetchLeavesForGroup(state.activeGroupId);
state.leaveLookup = keyBy(leaves, "id");
},

async fetchLeaveDateOptions() {
const { startDateOptions, endDateOptions } =
await api.getTermPayrollDates();
state.startDateOptions = startDateOptions;
state.endDateOptions = endDateOptions;
},
};

return {
Expand Down

0 comments on commit f56c1ca

Please sign in to comment.