diff --git a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/HomeModel/HomeModel.cs b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/HomeModel/HomeModel.cs index 171fc81..7f739ff 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/HomeModel/HomeModel.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/HomeModel/HomeModel.cs @@ -88,7 +88,9 @@ public string? notificationCount { get; set;} public string? RewardPoints { get; set;} public string? MembershipId { get; set; } - public string? CustomerName { get; set; } + public string? CustomerName { get; set; } + public string? RewardAmount { get; set; } + public string? ReferralCode { get; set; } } public class CustomerNotificationModel : CommonResponse diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs index 3c6a43c..0cbbe15 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs @@ -194,7 +194,7 @@ namespace CustomerOnlineV2.Repository.Repository.HomeRepository pCountry = Convert.ToString(item["pCountry"]), Id = Convert.ToString(item["Id"]), TransactionDay = Convert.ToString(item["tranDate"]), - Rate = Convert.ToString(item["customerRate"]), + //Rate = Convert.ToString(item["customerRate"]), Status = Convert.ToString(item["Status"]), receiverName = Convert.ToString(item["ReceiverName"]) }); diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs index c5b6715..8d2d25e 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs @@ -181,10 +181,10 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository Title = Convert.ToString(item["title"]), Body = Convert.ToString(item["body"]), Date = Convert.ToString(item["createDate"]), - //IsRead = Convert.ToString(item["isRead"]), + IsRead = Convert.ToString(item["isRead"]), //Type = Convert.ToString(item["type"]), //SentId = Convert.ToString(item["sentId"]), - // Category = Convert.ToString(item["category"]), + Category = Convert.ToString(item["category"]), //url = Convert.ToString(item["url"]), //IsClickable = Convert.ToString(item["isClickable"]) // notificationCount = Convert.ToString(item["notificationCount"]) @@ -330,31 +330,18 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository //_response.ResponseMessage = Convert.ToString(dt.Rows[0]["msg"]); List obj = new List(); - //if(dt.Rows.Count > 1) - //{ - // var item = dt.Rows[1]; - - // obj.Add(new NotificationModel - // { - // Title = Convert.ToString(item["REWARD_TYPE"]), - // RewardPoints = Convert.ToString(item["REWARD_AMOUNT"]), - // CustomerName = Convert.ToString(item["CUSTOMER_NAME"]), - // Date = Convert.ToString(item["CREATED_DATE"]), - // }); - //} - //else - //{ - // _response.ResponseMessage = "Error"; - //} + foreach (DataRow item in dt.Rows) { obj.Add(new NotificationModel { //Id = Convert.ToString(item["rowId"]), Title = Convert.ToString(item["REWARD_TYPE"]), - RewardPoints = Convert.ToString(item["REWARD_AMOUNT"]), + RewardAmount = Convert.ToString(item["REWARD_AMOUNT"]), CustomerName = Convert.ToString(item["CUSTOMER_NAME"]), Date = Convert.ToString(item["CREATED_DATE"]), + RewardPoints = Convert.ToString(item["REWARD_POINTS"]), + ReferralCode = Convert.ToString(item["REFERRAL_CODE"]), //IsRead = Convert.ToString(item["isRead"]), //Type = Convert.ToString(item["type"]), //SentId = Convert.ToString(item["sentId"]), diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Notifications.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Notifications.cshtml index 056c693..999fa7c 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Notifications.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Notifications.cshtml @@ -8,6 +8,7 @@ + @@ -37,10 +38,12 @@ =============================== -->
-
Title
-
Message
+ @*
S.N.
*@ +
Category
+
Title
+
Message
Date
- @*
Date
+ @*
Date
Transaction Type
*@
@@ -48,15 +51,16 @@
-
+
-
-
-
- @*
-
*@ + @*
${sn}
*@ +
${iconHtml}
+
${d.title}
+
${d.body}
+
${d.date}
+
@@ -127,7 +131,6 @@ }, async: false, success: function (response) { - debugger; // if (response.responsecode != 0) { // showalertmessage(response.responsecode, response.responsemessage); // } @@ -149,13 +152,38 @@ transactionList.empty(); $.each(result, function (i, d) { + + var iconHtml; + if (d.category === 'SUCCESS') { + iconHtml = d.isRead ? + // '' : + // ''; + ' ': + '< i class="fas fa-check-circle" style = "color: #8b8d8b;" > '; + + } else if (d.category === 'INFO') { + iconHtml = d.isRead ? + // '' : + // ''; + // ' ': + // ''; + ' ' : + '< i class="fa-info-circle" style = "color: #8b8d8b;" > '; + } else if (d.category === 'ERROR') { + iconHtml = d.isRead ? + // '' : + // ''; + ' ' : + ''; + } + var row = `
+
${iconHtml}
${d.title}
-
${d.body}
-
${d.date}
- +
${d.body}
+
${d.date}
`; @@ -164,5 +192,6 @@ } } + } \ No newline at end of file diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml index 4723eb4..243056e 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml @@ -8,26 +8,29 @@ @@ -103,29 +135,44 @@
- + @* *@ +
@@ -164,6 +211,7 @@ @section scripts{ } \ No newline at end of file diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml index 574055b..60858dd 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml @@ -379,7 +379,7 @@ row += '
'; row += '
'; - row += ''; + row += ''; row += '
'; row += '
'; diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml index ca37298..cc25826 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout.cshtml @@ -17,6 +17,11 @@ + @{ @@ -86,14 +91,16 @@
  • @*
  • - +
  • *@
  • + +
    -
    -
    +
    +
  • @@ -253,6 +260,42 @@ }); } + // function PopulateNotificationData(response) { + // var result = response.notificationModel; + + // if (response.responseCode == 0) { + // var notificationDetail = $('#notificationDetail'); + // var countElement = $('#count'); + + // var notificationCount = response.notificationModel[0].notificationCount; + // $('#count').text(notificationCount); + // $('#notifCount').text('NOTIFICATIONS (' + notificationCount + ')'); + + // notificationDetail.empty(); + + // for (var i = 0; i < result.length; i++) { + // var notification = result[i]; + + // var notificationItem = $('
  • '); + // var notificationLink = $('', { + // 'class': 'dropdown-item', + // 'href': '#' + // }); + + // var notificationContent = $('
    ', { 'class': 'notification-item' }); + // var notificationDate = $('
    ', { 'class': 'notification-date', 'id': 'date' }).text(notification.date); + // var notificationTitle = $('
    ', { 'class': 'notification-title', 'id': 'title' }).text(notification.title); + // var notificationBody = $('
    ', { 'class': 'notification-body', 'id': 'body' }).text(notification.body); + + // notificationContent.append(notificationDate, notificationTitle, notificationBody); + // notificationLink.append(notificationContent); + // notificationItem.append(notificationLink); + + // notificationDetail.append(notificationItem); + // } + // } + // } + function PopulateNotificationData(response) { var result = response.notificationModel; @@ -263,6 +306,8 @@ var notificationCount = response.notificationModel[0].notificationCount; $('#count').text(notificationCount); $('#notifCount').text('NOTIFICATIONS (' + notificationCount + ')'); + // if (response.responseCode == 0) { + // var notificationDetail = $('#notificationDetail'); notificationDetail.empty(); @@ -276,12 +321,12 @@ }); var notificationContent = $('
    ', { 'class': 'notification-item' }); - var notificationDate = $('
    ', { 'class': 'notification-date', 'id': 'date' }).text(notification.date); - var notificationTitle = $('
    ', { 'class': 'notification-title', 'id': 'title' }).text(notification.title); var notificationBody = $('
    ', { 'class': 'notification-body', 'id': 'body' }).text(notification.body); + var notificationDate = $('
    ', { 'class': 'notification-date text-1 text-muted d-block', 'id': 'date' }).text(notification.date); + - notificationContent.append(notificationDate, notificationTitle, notificationBody); - notificationLink.append(notificationContent); + notificationContent.append(notificationBody, notificationDate); + notificationLink.append('', notificationContent); notificationItem.append(notificationLink); notificationDetail.append(notificationItem); diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml index 162eeee..f0027b8 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Shared/_Layout2.cshtml @@ -17,7 +17,11 @@ - + @{ @@ -90,10 +94,10 @@
  • +
    -
    -
    +
  • @@ -211,6 +215,8 @@ var notificationCount = response.notificationModel[0].notificationCount; $('#count').text(notificationCount); $('#notifCount').text('NOTIFICATIONS (' + notificationCount + ')'); + // if (response.responseCode == 0) { + // var notificationDetail = $('#notificationDetail'); notificationDetail.empty(); @@ -224,18 +230,19 @@ }); var notificationContent = $('
    ', { 'class': 'notification-item' }); - var notificationDate = $('
    ', { 'class': 'notification-date', 'id': 'date' }).text(notification.date); - var notificationTitle = $('
    ', { 'class': 'notification-title', 'id': 'title' }).text(notification.title); var notificationBody = $('
    ', { 'class': 'notification-body', 'id': 'body' }).text(notification.body); + var notificationDate = $('
    ', { 'class': 'notification-date text-1 text-muted d-block', 'id': 'date' }).text(notification.date); + - notificationContent.append(notificationDate, notificationTitle, notificationBody); - notificationLink.append(notificationContent); + notificationContent.append(notificationBody, notificationDate); + notificationLink.append('', notificationContent); notificationItem.append(notificationLink); notificationDetail.append(notificationItem); } } } + @await RenderSectionAsync("Scripts", required: false) diff --git a/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/REEFER-AND-earn.png b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/REEFER-AND-earn.png new file mode 100644 index 0000000..7e49d23 Binary files /dev/null and b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/REEFER-AND-earn.png differ diff --git a/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Info-color.png.png b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Info-color.png.png new file mode 100644 index 0000000..84645ad Binary files /dev/null and b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Info-color.png.png differ diff --git a/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Info-grey..png b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Info-grey..png new file mode 100644 index 0000000..5733a55 Binary files /dev/null and b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Info-grey..png differ diff --git a/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Success-color..png b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Success-color..png new file mode 100644 index 0000000..301495a Binary files /dev/null and b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Success-color..png differ diff --git a/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Success-grey.png b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Success-grey.png new file mode 100644 index 0000000..3715ac3 Binary files /dev/null and b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-Success-grey.png differ diff --git a/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-error-color.png b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-error-color.png new file mode 100644 index 0000000..8323656 Binary files /dev/null and b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-error-color.png differ diff --git a/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-error-grey.png b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-error-grey.png new file mode 100644 index 0000000..d02685d Binary files /dev/null and b/CustomerOnlineV2/CustomerOnlineV2/wwwroot/images/notify-error-grey.png differ