Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I made review page where user can submit reviews. Once he submits review it appears below. I want to make that when user posts review he can reply to it, but once he replies, he has to wait for admin to answer.
It should look like:

`Comment that user submited
User reply
Admin reply
User reply
Admin reply`
....
But I am not sure how to do it.

What I have tried:

I think of saving user status to database when posting reply.


$scope.postReply=function(index,comment){
            var status="";
        console.log($cookies.get('userCookie'));debugger;
        if($cookies.get('userCookie')){
            status="user";
        }
        else{
            status="admin";
        }debugger;
        var JSONObject={
                "userStatus":status,
                "reviewId":$scope.all[index].id,
                "email":$scope.all[index].email,
                "time":"",
                "comment": comment
            };
            var Results = UniversalService.PostReply(JSON.stringify(JSONObject));
    }

But I am not sure how to show/
hide reply based on that, because my user and admin shares the same view for reviews.


This is my html:
[HTML] <html - Pastebin.com[^]
Does anyone have any ideas?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900