Skip to content

Commit

Permalink
Merge pull request #225 from uasoft-indonesia/bugfix/v2/comment
Browse files Browse the repository at this point in the history
fixing menu comment
  • Loading branch information
rizkiheryandi authored Aug 9, 2024
2 parents c34d6fa + 7358a46 commit 80bc699
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/resources/js/pages/comment/browse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
</template>

<script>
import moment from "moment";
export default {
name: "CommentBrowse",
components: {},
Expand Down Expand Up @@ -157,6 +158,17 @@ export default {
this.$closeLoader();
this.selected = [];
this.comments = response.data.comments;
this.comments.map((tr) => {
if (tr.createdAt || tr.updatedAt) {
tr.createdAt = moment(tr.createdAt).format(
"YYYY-MM-DD hh:mm:ss"
);
tr.updatedAt = moment(tr.updatedAt).format(
"YYYY-MM-DD hh:mm:ss"
);
}
return tr;
});
})
.catch((error) => {
this.$closeLoader();
Expand Down
2 changes: 1 addition & 1 deletion src/resources/js/pages/comment/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default {
this.$closeLoader();
this.selected = [];
if (response.data.posts) {
this.posts = response.data.posts.map((post, index) => {
this.posts = response.data.posts.data.map((post, index) => {
return {
label: post.title,
value: post.id
Expand Down

0 comments on commit 80bc699

Please sign in to comment.