+
+ <% if !obj.confirmed && !obj.signed_contract_file.url.nil? %>
+ Confirm
+ <% end %>
+
+
+<% end %>
+
+<% else %>
+
+
+ Sorry, we found nothing.
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/client_managements/_history_partial.html.erb b/app/views/client_managements/_history_partial.html.erb
new file mode 100644
index 0000000..5176c41
--- /dev/null
+++ b/app/views/client_managements/_history_partial.html.erb
@@ -0,0 +1,42 @@
+<% if !@objects.empty? %>
+ <% @objects.each do |obj| %>
+
+ <% if obj.completed %>
+ Completed
+ <% else %>
+ Requested
+ <% end %>
+
+ <% if !obj.completed %>
+ Cancel
+ <% else %>
+ <% if (obj.type == "newsite" || obj.type == "existing") && !obj.request_contract.nil? %>
+ Contract
+ <% end %>
+ <% end %>
+
+
+ <% end %>
+
+<% else %>
+
+
+ Sorry, we found nothing.
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/client_managements/contracts.html.erb b/app/views/client_managements/contracts.html.erb
new file mode 100644
index 0000000..1f08882
--- /dev/null
+++ b/app/views/client_managements/contracts.html.erb
@@ -0,0 +1,89 @@
+<% content_for :page_menu do %>
+
+
+
\ No newline at end of file
diff --git a/app/views/client_managements/history.html.erb b/app/views/client_managements/history.html.erb
index e05c49a..5c39931 100644
--- a/app/views/client_managements/history.html.erb
+++ b/app/views/client_managements/history.html.erb
@@ -12,51 +12,78 @@
History
+
+
\ No newline at end of file
diff --git a/app/views/client_managements/show.html.erb b/app/views/client_managements/show.html.erb
index 376fe18..453cab4 100644
--- a/app/views/client_managements/show.html.erb
+++ b/app/views/client_managements/show.html.erb
@@ -70,7 +70,7 @@
});
$(document).ready(function(){
- getTickets(pageNo);
+ getObjects(pageNo);
if(category){
$("select#category").val(category);
$("#search-clear-btn").removeClass("hide");
@@ -94,7 +94,7 @@
dataType : "json"
}).done(function(data){
if(data.success){
- getTickets(pageNo);
+ getObjects(pageNo);
}else{
errorArea.find(".message-text").text("Sorry, we were unable to perform the requested action.");
errorArea.removeClass("hide");
@@ -105,7 +105,7 @@
return false;
})
- var getTickets = function(page){
+ var getObjects = function(page){
pageNo = page;
ticketsDom.hide();
loader.show();
@@ -122,7 +122,7 @@
loader.hide();
var total_pages = parseInt(ticketsDom.find("input[type=hidden].total-pages").val());
if (total_pages > 1){
- constructPagination(page, total_pages, "tickets");
+ constructPagination(page, total_pages);
}
}, 500);
})
diff --git a/config/locales/en.yml b/config/locales/en.yml
index baaacaf..fbe71f7 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -44,4 +44,6 @@ en:
contracts: Contracts
contract_uid: Contract ID
site: Site
- created_on: Created On
\ No newline at end of file
+ created_on: Created On
+ loading_history: Loading History
+ loading_contracts: Loading Contracts
\ No newline at end of file
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index 7b3476a..e0e6e28 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -44,4 +44,6 @@ zh_tw:
contracts: Contracts
contract_uid: Contract ID
site: Site
- created_on: Created On
\ No newline at end of file
+ created_on: Created On
+ loading_history: Loading History
+ loading_contracts: Loading Contracts
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 8930d85..ddb6d14 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -40,7 +40,12 @@ Rails.application.routes.draw do
# history
get "history" => "client_managements#history", as: "cpanel_myhistory"
+ get "contracts" => "client_managements#contracts", as: "cpanel_mycontracts"
get "request/:request_uid" => "client_managements#see_request"
+ get "contract/:contract_uid" => "client_managements#see_contract", as: "cpanel_contract_show"
+ patch "contract/:contract_uid/update_contract" => "client_managements#update_contract"
+ get "request/:request_uid/cancel" => "client_managements#cancel_request", as: "cpanel_cancel_request"
+ get "contract/:contract_uid/confirm" => "client_managements#confirm_contract"
# ticket
get "site/:site_uid/new_ticket" => "client_managements#new_ticket"