Skip to content

Commit

Permalink
Merge pull request #579 from amansinghbais/#578
Browse files Browse the repository at this point in the history
Improved: sending additional field while cycleCount creation for backend compatibility (#578)
  • Loading branch information
ymaheshwari1 authored Jan 3, 2025
2 parents c338b8f + 73fc0c7 commit 18a7238
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/views/Draft.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ import Filters from "@/components/Filters.vue"
import store from "@/store";
import { showToast } from "@/utils";
import router from "@/router";
import { DateTime } from "luxon";
const cycleCounts = computed(() => store.getters["count/getCounts"])
const cycleCountStats = computed(() => (id: string) => store.getters["count/getCycleCountStats"](id))
const isScrollable = computed(() => store.getters["count/isCycleCountListScrollable"])
const query = computed(() => store.getters["count/getQuery"])
const userProfile = computed(() => store.getters["user/getUserProfile"])
const isScrollingEnabled = ref(false);
const contentRef = ref({}) as any
Expand Down Expand Up @@ -179,7 +181,9 @@ async function createCycleCount() {
// When initially creating the cycleCount we are just assigning it a name, all the other params are updated from the details page
await store.dispatch("count/createCycleCount", {
countImportName: name,
statusId: "INV_COUNT_CREATED"
statusId: "INV_COUNT_CREATED",
uploadedByUserLogin: userProfile.value.username,
createdDate: DateTime.now().toMillis()
})
}
})
Expand Down
5 changes: 4 additions & 1 deletion src/views/HardCount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const countNameRef = ref("") as Ref<any>;
const infiniteScrollRef = ref("");
const facilityGroups = computed(() => store.getters["util/getFacilityGroups"])
const userProfile = computed(() => store.getters["user/getUserProfile"])
onIonViewWillEnter(async () => {
countName.value = `Hard count - ${DateTime.now().toFormat('dd-MM-yyyy hh:mm:ss')}`;
Expand Down Expand Up @@ -178,7 +179,9 @@ async function saveCount() {
let count = {
countImportName: countName.value,
statusId: isAutoAssignEnabled.value ? "INV_COUNT_ASSIGNED" : "INV_COUNT_CREATED",
countTypeEnumId: "HARD_COUNT"
countTypeEnumId: "HARD_COUNT",
uploadedByUserLogin: userProfile.value.username,
createdDate: DateTime.now().toMillis()
} as any;
if(dueDate.value) count["dueDate"] = dueDate.value;
Expand Down

0 comments on commit 18a7238

Please sign in to comment.