Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Parse the moment date object to date string before sending filter req…
Browse files Browse the repository at this point in the history
…uest #1387
  • Loading branch information
wiadev committed Jan 17, 2018
1 parent 8178717 commit 6a2695e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/actions/ViewActions.js
@@ -1,5 +1,5 @@
import axios from "axios";

import Moment from "moment";
import { getQueryString } from "./GenericActions";

export function getViewLayout(windowId, viewType, viewProfileId = null) {
Expand Down Expand Up @@ -86,6 +86,14 @@ export function createViewRequest({
}

export function filterViewRequest(windowId, viewId, filters) {
filters.map(filter => {
filter.parameters.map((param, index) => {
if (param.caption === "Date") {
filter.parameters[index].value = Moment(param.value).format();
}
});
});
console.log(filters);
return axios.post(
config.API_URL + "/documentView/" + windowId + "/" + viewId + "/filter",
{
Expand Down

0 comments on commit 6a2695e

Please sign in to comment.