usman 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/usman/api/v1/base_controller.rb +15 -0
  3. data/app/controllers/usman/api/v1/docs_base_controller.rb +25 -0
  4. data/app/controllers/usman/api/v1/docs_controller.rb +165 -0
  5. data/app/controllers/usman/api/v1/profile_controller.rb +60 -0
  6. data/app/controllers/usman/api/v1/registrations_controller.rb +159 -0
  7. data/app/controllers/usman/registration_devices_controller.rb +141 -0
  8. data/app/controllers/usman/registrations_controller.rb +68 -0
  9. data/app/helpers/usman/api_helper.rb +21 -36
  10. data/app/helpers/usman/authentication_helper.rb +1 -1
  11. data/app/models/device.rb +30 -3
  12. data/app/models/registration.rb +12 -3
  13. data/app/models/user.rb +54 -4
  14. data/app/services/usman/mobile_registration_service.rb +3 -5
  15. data/app/views/kuppayam/api/docs/_navigation.html.erb +43 -0
  16. data/app/views/usman/api/v1/docs/register/_neg_case_1.html.erb +46 -0
  17. data/app/views/usman/api/v1/docs/register/_neg_case_2.html.erb +39 -0
  18. data/app/views/usman/api/v1/docs/register/_neg_case_3.html.erb +47 -0
  19. data/app/views/usman/api/v1/docs/register/_pos_case_1.html.erb +65 -0
  20. data/app/views/usman/api/v1/docs/resend_otp/_neg_case_1.html.erb +30 -0
  21. data/app/views/usman/api/v1/docs/resend_otp/_pos_case_1.html.erb +31 -0
  22. data/app/views/usman/api/v1/docs/verify_otp/_neg_case_1.html.erb +34 -0
  23. data/app/views/usman/api/v1/docs/verify_otp/_neg_case_2.html.erb +39 -0
  24. data/app/views/usman/api/v1/docs/verify_otp/_neg_case_3.html.erb +33 -0
  25. data/app/views/usman/api/v1/docs/verify_otp/_pos_case_1.html.erb +35 -0
  26. data/app/views/usman/registration_devices/_form.html.erb +24 -0
  27. data/app/views/usman/registration_devices/_index.html.erb +80 -0
  28. data/app/views/usman/registration_devices/_row.html.erb +34 -0
  29. data/app/views/usman/registrations/_form.html.erb +23 -0
  30. data/app/views/usman/registrations/_index.html.erb +60 -0
  31. data/app/views/usman/registrations/_row.html.erb +24 -0
  32. data/app/views/usman/registrations/_show.html.erb +112 -0
  33. data/app/views/usman/registrations/index.html.erb +47 -0
  34. data/config/locales/usman/api.ar.yml +43 -0
  35. data/config/locales/usman/api.en.yml +43 -0
  36. data/config/locales/usman/authentication.ar.yml +14 -14
  37. data/config/locales/usman/authentication.en.yml +15 -18
  38. data/config/routes.rb +28 -9
  39. data/db/migrate/20170904080436_add_tac_accepted_at_to_devices.rb +5 -0
  40. data/db/migrate/20170905041104_add_gender_to_users.rb +6 -0
  41. data/lib/usman/version.rb +1 -1
  42. metadata +36 -15
  43. data/app/controllers/api/v1/base_controller.rb +0 -13
  44. data/app/controllers/api/v1/registrations_controller.rb +0 -115
  45. data/app/controllers/usman/docs_controller.rb +0 -41
  46. data/app/views/usman/docs/index.html.erb +0 -502
  47. data/app/views/usman/docs/register.html.erb +0 -0
  48. data/config/locales/usman/general.ar.yml +0 -5
  49. data/config/locales/usman/general.en.yml +0 -5
  50. data/config/locales/usman/mobile_registration.ar.yml +0 -26
  51. data/config/locales/usman/mobile_registration.en.yml +0 -26
@@ -0,0 +1,39 @@
1
+ <%
2
+
3
+ api_title = "Negative Case - 2 - should set proper errors when device information is missing"
4
+
5
+ api_input = <<-eos
6
+ {
7
+ "country_id": "1",
8
+ "dialing_prefix": "+92",
9
+ "mobile_number": "501370323"
10
+ }
11
+ eos
12
+
13
+ api_output = <<-eos
14
+ {
15
+ "success": false,
16
+ "errors": {
17
+ "heading": "Registring new mobile number FAILED",
18
+ "message": "Check if all mandatory details are passed. Refer the error details for technical information",
19
+ "details": {
20
+ "uuid": [
21
+ "can't be blank"
22
+ ],
23
+ "device_token": [
24
+ "can't be blank"
25
+ ]
26
+ }
27
+ }
28
+ }
29
+ eos
30
+
31
+ %>
32
+
33
+ <%= render partial: "kuppayam/api/docs/example", locals: {
34
+ negative_case: true,
35
+ example_id: "neg_case_2",
36
+ api_title: api_title,
37
+ api_input: api_input,
38
+ api_output: api_output
39
+ } %>
@@ -0,0 +1,33 @@
1
+ <%
2
+
3
+ api_title = "Negative Case - 3 - should respond with proper errors if the device is blocked"
4
+
5
+ api_input = <<-eos
6
+ {
7
+ "otp": "11111",
8
+ "uuid": "asd907asdba78sbda",
9
+ "mobile_number": "292991230",
10
+ "dialing_prefix": "+91"
11
+ }
12
+ eos
13
+
14
+ api_output = <<-eos
15
+ {
16
+ "success": false,
17
+ "errors": {
18
+ "heading": "This device is blocked.",
19
+ "message": "You must have done some mal-practices.",
20
+ "details": {}
21
+ }
22
+ }
23
+ eos
24
+
25
+ %>
26
+
27
+ <%= render partial: "kuppayam/api/docs/example", locals: {
28
+ negative_case: true,
29
+ example_id: "neg_case_3",
30
+ api_title: api_title,
31
+ api_input: api_input,
32
+ api_output: api_output
33
+ } %>
@@ -0,0 +1,35 @@
1
+ <%
2
+
3
+ api_title = "Positive Case - 1 - should verify an otp verification request from a pending device"
4
+
5
+ api_input = <<-eos
6
+ {
7
+ "otp": "11111",
8
+ "uuid": "90a0dadsand",
9
+ "mobile_number": "9102993912",
10
+ "dialing_prefix": "+91"
11
+ }
12
+ eos
13
+
14
+ api_output = <<-eos
15
+ {
16
+ "success": true,
17
+ "alert": {
18
+ "heading": "OTP was verified succesfully",
19
+ "message": "Store and use the API token for further communication"
20
+ },
21
+ "data": {
22
+ "api_token": "cfc0eb18c8f3b5922e702f1e10437fa1"
23
+ }
24
+ }
25
+ eos
26
+
27
+ %>
28
+
29
+ <%= render partial: "kuppayam/api/docs/example", locals: {
30
+ negative_case: false,
31
+ example_id: "pos_case_1",
32
+ api_title: api_title,
33
+ api_input: api_input,
34
+ api_output: api_output
35
+ } %>
@@ -0,0 +1,24 @@
1
+ <%= form_for([@role, @user], :html => {:id=>"form_user", :class=>"mb-0 form-horizontal", :user => "form", :method => (@user.new_record? ? :post : :put), :remote=>true}) do |f| %>
2
+
3
+ <div id="user_form_error">
4
+ <%= @user.errors[:base].to_sentence %>
5
+ </div>
6
+
7
+ <div class="form-inputs mb-30 mt-30">
8
+ <% options = {assoc_collection: User.approved.normal_users.select("id, name").order("name ASC").all, required: false, editable: true, assoc_display_method: :name} %>
9
+ <%= theme_form_assoc_group(@user, :id, label: "Select User", **options) %>
10
+ </div>
11
+
12
+ <div>
13
+
14
+ <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
15
+
16
+ <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "pull-right ml-10 btn btn-white" %>
17
+
18
+ </div>
19
+ <%= clear_tag(10) %>
20
+
21
+ </div>
22
+
23
+ <% end %>
24
+
@@ -0,0 +1,80 @@
1
+ <div class="table-responsive">
2
+ <table class="table table-hover members-table middle-align">
3
+ <thead>
4
+ <tr>
5
+ <th style="text-align: center;width:60px">#</th>
6
+ <th>Status</th>
7
+ <th>UUID</th>
8
+ <th>Device Token</th>
9
+ <th>Device Name</th>
10
+ <th>Device Type</th>
11
+ <th>Operating System</th>
12
+ <th>Software Version</th>
13
+ <th>Last Accessed at</th>
14
+ <th>Last Accessed API</th>
15
+ <% if @current_user.super_admin? %>
16
+ <th>OTP</th>
17
+ <% end %>
18
+ <th>OTP Sent at</th>
19
+ <th style="text-align: center;" colspan="2">Actions</th>
20
+ </tr>
21
+ </thead>
22
+
23
+ <tbody>
24
+ <% @devices.each_with_index do |device, i| %>
25
+
26
+ <%# delete_link = registration_device_path(@registration, device) %>
27
+
28
+ <tr id="tr_device_<%= device.id %>">
29
+
30
+ <th scope="row" style="text-align: center;">
31
+ <% if i < 0 %>
32
+ <i class="fa fa-check text-success"></i>
33
+ <% else %>
34
+ <%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
35
+ <% end %>
36
+ </th>
37
+
38
+ <td>
39
+ <% if device.pending? %>
40
+ <span class="ml-5 mt-5 label label-default">Pending</span>
41
+ <% elsif device.verified? %>
42
+ <span class="ml-5 mt-5 label label-success">Verified</span>
43
+ <% elsif device.blocked? %>
44
+ <span class="ml-5 mt-5 label label-danger">Blocked</span>
45
+ <% end %>
46
+ </td>
47
+
48
+ <td class="device-name"><%= device.uuid %></td>
49
+ <td class="device-name"><%= device.device_token %></td>
50
+ <td class="device-name"><%= device.device_name %></td>
51
+ <td class="device-name"><%= device.device_type %></td>
52
+ <td class="device-name"><%= device.operating_system %></td>
53
+ <td class="device-name"><%= device.software_version %></td>
54
+ <td class="device-name"><%= device.last_accessed_at %></td>
55
+ <td class="device-name"><%= device.last_accessed_api %></td>
56
+
57
+ <% if @current_user.super_admin? %>
58
+ <td class="device-name"><%= device.otp %></td>
59
+ <% end %>
60
+
61
+ <td class="device-name"><%= device.otp_sent_at %></td>
62
+
63
+ <td class="action-links" style="width:10%">
64
+
65
+ <%#= link_to raw("<i class=\"linecons-trash\"></i> Remove Role"), delete_link, method: :delete, device: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
66
+
67
+ </td>
68
+
69
+ </tr>
70
+ <% end %>
71
+ </tbody>
72
+ </table>
73
+ </div>
74
+
75
+ <div class="row">
76
+ <div class="col-sm-12">
77
+ <%= paginate_kuppayam(@devices) %>
78
+ </div>
79
+ </div>
80
+
@@ -0,0 +1,34 @@
1
+ <% edit_link = edit_role_user_path(@role, user) %>
2
+ <% delete_link = role_user_path(@role, user) %>
3
+
4
+ <tr id="tr_user_<%= user.id %>">
5
+
6
+ <th scope="row" style="text-align: center;">
7
+ <% if i < 0 %>
8
+ <i class="fa fa-check text-success"></i>
9
+ <% else %>
10
+ <%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
11
+ <% end %>
12
+ </th>
13
+
14
+ <td class="user-image">
15
+ <%= link_to(user_path(user), remote: true) do %>
16
+ <%= display_image(user, "profile_picture.image.small.url", width: "120", height: "auto", class: "img-rectangle", alt: user.display_name) %>
17
+ <% end %>
18
+ </td>
19
+
20
+ <td class="user-name"><%= user.display_name %></td>
21
+
22
+ <td class="user-name">
23
+ <% user.roles.collect(&:name).each do |r| %>
24
+ <span class="ml-5 label label-primary"><%= r %></span>
25
+ <% end %>
26
+ </td>
27
+
28
+ <td class="action-links" style="width:10%">
29
+
30
+ <%= link_to raw("<i class=\"linecons-trash\"></i> Remove Role"), delete_link, method: :delete, user: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
31
+
32
+ </td>
33
+
34
+ </tr>
@@ -0,0 +1,23 @@
1
+ <%= form_for([@registration], :html => {:id=>"form_registration", :class=>"mb-0 form-horizontal", :registration => "form", :method => (@registration.new_record? ? :post : :put), :remote=>true}) do |f| %>
2
+
3
+ <div id="registration_form_error">
4
+ <%= @registration.errors[:base].to_sentence %>
5
+ </div>
6
+
7
+ <div class="form-inputs mb-30 mt-30">
8
+ <%= theme_form_field(@registration, :name) %>
9
+ </div>
10
+
11
+ <div>
12
+
13
+ <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %>
14
+
15
+ <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeLargeModal();", class: "pull-right ml-10 btn btn-white" %>
16
+
17
+ </div>
18
+ <%= clear_tag(10) %>
19
+
20
+ </div>
21
+
22
+ <% end %>
23
+
@@ -0,0 +1,60 @@
1
+ <div class="table-responsive">
2
+ <table class="table table-hover members-table middle-align">
3
+ <thead>
4
+ <tr>
5
+ <th style="text-align: center;width:50px;">#</th>
6
+ <th style="text-align: left;">Mobile</th>
7
+ <th style="text-align: left;width:200px;">Location</th>
8
+ <th style="text-align: left;width:200px;">User</th>
9
+ <th style="text-align: left;width:200px;">Status</th>
10
+ </tr>
11
+ </thead>
12
+
13
+ <tbody>
14
+ <% @registrations.each_with_index do |registration, i| %>
15
+
16
+ <%# edit_link = edit_registration_path(id: registration.id) %>
17
+ <%# delete_link = registration_path(id: registration.id) %>
18
+
19
+ <tr id="tr_registration_<%= registration.id %>">
20
+
21
+ <th scope="row" style="text-align: center;">
22
+ <% if i < 0 %>
23
+ <i class="fa fa-check text-success"></i>
24
+ <% else %>
25
+ <%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
26
+ <% end %>
27
+ </th>
28
+
29
+ <td class="registration-name"><%= link_to registration.display_name, registration_path(registration), remote: true %></td>
30
+ <td class="registration-name"><%= link_to registration.display_location, registration_path(registration), remote: true %></td>
31
+ <td class="registration-name"><%= link_to registration.display_name, registration_path(registration), remote: true %></td>
32
+
33
+ <td>
34
+ <% if registration.pending? %>
35
+ <span class="ml-5 mt-5 label label-default">Pending</span>
36
+ <% elsif registration.verified? %>
37
+ <span class="ml-5 mt-5 label label-success">Verified</span>
38
+ <% end %>
39
+ </td>
40
+
41
+ <!-- <td class="action-links" style="width:10%">
42
+
43
+ <%#= link_to raw("<i class=\"linecons-pencil\"></i> Edit Registration"), edit_link, :remote=>true, class: "edit" if @current_user.super_admin? and registration.can_be_edited? %>
44
+
45
+ <%#= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, registration: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" if @current_user.super_admin? and registration.can_be_deleted? %>
46
+
47
+ </td> -->
48
+
49
+ </tr>
50
+ <% end %>
51
+ </tbody>
52
+ </table>
53
+ </div>
54
+
55
+ <div class="row">
56
+ <div class="col-sm-12">
57
+ <%= paginate_kuppayam(@registrations) %>
58
+ </div>
59
+ </div>
60
+
@@ -0,0 +1,24 @@
1
+ <% edit_link = edit_registration_path(id: registration.id) %>
2
+ <% delete_link = registration_path(id: registration.id) %>
3
+
4
+ <tr id="tr_registration_<%= registration.id %>">
5
+
6
+ <th scope="row" style="text-align: center;">
7
+ <% if i < 0 %>
8
+ <i class="fa fa-check text-success"></i>
9
+ <% else %>
10
+ <%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
11
+ <% end %>
12
+ </th>
13
+
14
+ <td class="registration-name"><%= link_to registration.name, registration_path(registration), remote: true %></td>
15
+
16
+ <td class="action-links" style="width:10%">
17
+
18
+ <%= link_to raw("<i class=\"linecons-pencil\"></i> Edit Registration"), edit_link, :remote=>true, class: "edit" if @current_user.super_admin? and registration.can_be_edited? %>
19
+
20
+ <%= link_to raw("<i class=\"linecons-trash\"></i> Delete"), delete_link, method: :delete, registration: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" if @current_user.super_admin? and registration.can_be_deleted? %>
21
+
22
+ </td>
23
+
24
+ </tr>
@@ -0,0 +1,112 @@
1
+ <% @devices = @registration.devices.page(@current_page).per(@per_page) %>
2
+
3
+ <div id="div_registration_show">
4
+
5
+ <div class="row">
6
+
7
+ <div class="col-md-9 col-sm-12 col-xs-12" style="border-right:1px solid #f1f1f1;">
8
+
9
+ <div class="visible-sm visible-xs mt-50"></div>
10
+
11
+ <%= theme_panel_heading(@registration.display_name) %>
12
+
13
+ <% if @registration.pending? %>
14
+ <span class="ml-5 mt-5 label label-default">Pending</span>
15
+ <% elsif @registration.verified? %>
16
+ <span class="ml-5 mt-5 label label-success">Verified</span>
17
+ <% end %>
18
+
19
+ <%= clear_tag(10) %>
20
+
21
+ <div class="visible-sm visible-xs mb-50"></div>
22
+
23
+ </div>
24
+
25
+ <div class="col-md-3 col-sm-12 col-xs-12">
26
+
27
+ <%# edit_link = edit_registration_path(id: @registration.id) %>
28
+ <%# delete_link = registration_path(id: @registration.id) %>
29
+
30
+ <%#= link_to raw("<i class=\"linecons-pencil\"></i> Edit Registration"), edit_link, :remote=>true, class: "btn btn-block btn-success" if @current_device.super_admin? and @registration.can_be_edited? %>
31
+
32
+ <%#= link_to raw("<i class=\"linecons-trash\"></i> Delete Registration"), delete_link, method: :delete, registration: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "btn btn-block btn-danger btn-only-hover" if @current_device.super_admin? and @registration.can_be_deleted? %>
33
+
34
+ <div class="visible-sm visible-xs mb-50"></div>
35
+
36
+ </div>
37
+
38
+ </div>
39
+
40
+ <%= clear_tag(50) %>
41
+
42
+ <ul class="nav nav-pills">
43
+
44
+ <li class="active">
45
+ <a href="#device_registrations" data-toggle="tab" aria-expanded="false">
46
+ <span class="visible-xs"><i class="fa-database"></i></span>
47
+ <span class="hidden-xs">Devices</span>
48
+ </a>
49
+ </li>
50
+
51
+ <li class="">
52
+ <a href="#technical_details" data-toggle="tab" aria-expanded="false">
53
+ <span class="visible-xs"><i class="fa-database"></i></span>
54
+ <span class="hidden-xs">Technical Details</span>
55
+ </a>
56
+ </li>
57
+ </ul>
58
+
59
+ <div class="tab-content">
60
+
61
+ <div class="tab-pane active" id="device_registrations" style="border: 1px solid #000;min-height:200px;padding:20px;margin-bottom:20px;max-height: 400px;overflow-y: auto;">
62
+
63
+ <%= clear_tag(20) %>
64
+
65
+ <div id="div_device_action_buttons">
66
+ <div class="row">
67
+ <div class="col-md-6">
68
+
69
+ <%#= theme_button('Add a Device', 'plus', new_registration_device_path(@registration), classes: "pull-left", btn_type: "success") %>
70
+
71
+ <%= theme_button('Refresh', 'refresh', registration_devices_path(@registration), classes: "pull-left", btn_type: "white") %>
72
+ </div>
73
+ <div class="col-md-6">
74
+ <%= search_form_kuppayam(Registration, registration_devices_path(@registration), text: "") %>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ <%= clear_tag(10) %>
79
+
80
+ <div id="div_device_index">
81
+ <%= render :partial=>"usman/registration_devices/index" %>
82
+ </div>
83
+ </div>
84
+
85
+ <div class="tab-pane" id="technical_details">
86
+
87
+ <%= clear_tag(20) %>
88
+
89
+ <div class="table-responsive">
90
+ <table class="table table-striped table-condensed table-bordered mb-30">
91
+ <tbody>
92
+
93
+ <tr>
94
+ <th>ID</th><td colspan="3"><%= @registration.id %></td>
95
+ </tr>
96
+
97
+ <tr>
98
+ <th>Created At</th><td><%= @registration.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @registration.created_at %></td>
99
+ <th>Updated At</th><td><%= @registration.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @registration.updated_at %></td>
100
+ </tr>
101
+
102
+ </tbody>
103
+ </table>
104
+ </div>
105
+ </div>
106
+
107
+ </div>
108
+
109
+ <%= link_to "Close", "#", onclick: "closeLargeModal();", class: "btn btn-primary pull-right" %>
110
+
111
+ <%= clear_tag %>
112
+ </div>
@@ -0,0 +1,47 @@
1
+ <div class="row">
2
+
3
+ <div class="col-md-12">
4
+
5
+ <ul class="nav nav-tabs">
6
+ </ul>
7
+ <div class="tab-content">
8
+ <div class="tab-pane active">
9
+
10
+ <div id="div_registration_action_buttons">
11
+ <div class="row">
12
+ <div class="col-md-6">
13
+
14
+ <%= theme_button('Refresh', 'refresh', registrations_path(), classes: "pull-left", btn_type: "white") %>
15
+
16
+ <!-- Single button -->
17
+ <div class="ml-10 btn-group hidden">
18
+ <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
19
+ More Actions <span class="caret"></span>
20
+ </button>
21
+ <ul class="dropdown-menu">
22
+ <li><a href="#">Import Users</a></li>
23
+ <li><a href="#">Import History</a></li>
24
+ <li registration="separator" class="divider"></li>
25
+ <li><a href="#">Export Users</a></li>
26
+ </ul>
27
+ </div>
28
+
29
+ </div>
30
+ <div class="col-md-6">
31
+ <%= search_form_kuppayam(Registration, registrations_path, text: @filters[:query]) %>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ <%= clear_tag(10) %>
36
+
37
+ <div id="div_registration_index">
38
+ <%= render :partial=>"usman/registrations/index" %>
39
+ </div>
40
+ <%= clear_tag(10) %>
41
+
42
+ </div>
43
+ </div>
44
+
45
+ </div>
46
+
47
+ </div>
@@ -0,0 +1,43 @@
1
+ en:
2
+ api:
3
+ general:
4
+ heading: "Invalid API Token"
5
+ message: "Use the API Token you have received after accepting the terms and agreement"
6
+ mobile_registration:
7
+ device_blocked:
8
+ heading: "This device is blocked"
9
+ message: "You must have done some mal-practices"
10
+ invalid_inputs:
11
+ heading: "Registring new mobile number FAILED"
12
+ message: "Check if all mandatory details are passed. Refer the error details for technical information"
13
+ otp_sent:
14
+ heading: "An OTP has been sent to you"
15
+ message: "Check your mobile for new message from us"
16
+ new_otp_sent:
17
+ heading: "An new OTP has been sent to you"
18
+ message: "Check your mobile for new message from us"
19
+ otp_not_sent:
20
+ heading: "OTP was not sent"
21
+ message: "There was some technical glitch and OTP was not sent. Try after some time"
22
+ otp_not_matching:
23
+ heading: "OTP verification was failed"
24
+ message: "Make sure that you enter the OTP correctly"
25
+ verification_failed:
26
+ heading: "OTP verification was failed"
27
+ message: "Check if you have properly given the OTP along with dialing prefix, mobile number & UUID"
28
+ verification_success:
29
+ heading: "OTP was verified succesfully"
30
+ message: "Now, accept the terms and conditions to finish the registration process and get API token"
31
+ tac_accepted:
32
+ heading: "You have successfully accepted the Terms & Conditions. Proceed with Registration process if any"
33
+ message: "Store and use the API token for further communication"
34
+ tac_not_accepted:
35
+ heading: "You have not accepted the Terms & Conditions. Registration is complete only if you accept the T&C"
36
+ message: "Accept the T&C to finish the Registration. Pass true"
37
+ profile:
38
+ user_already_exists:
39
+ heading: "A profile already exists for the mobile number you have provided"
40
+ message: "You are trying to create a profile once again when you already have a profile. Use Profile API with your API Token, to get your profile details and use them instead of creating a new one."
41
+ profile_created:
42
+ heading: "The Profile has been created successfully"
43
+ message: "You may access the profile API with API token to get the profile details in future"
@@ -0,0 +1,43 @@
1
+ en:
2
+ api:
3
+ general:
4
+ heading: "Invalid API Token"
5
+ message: "Use the API Token you have received after accepting the terms and agreement"
6
+ mobile_registration:
7
+ device_blocked:
8
+ heading: "This device is blocked"
9
+ message: "You must have done some mal-practices"
10
+ invalid_inputs:
11
+ heading: "Registring new mobile number FAILED"
12
+ message: "Check if all mandatory details are passed. Refer the error details for technical information"
13
+ otp_sent:
14
+ heading: "An OTP has been sent to you"
15
+ message: "Check your mobile for new message from us"
16
+ new_otp_sent:
17
+ heading: "An new OTP has been sent to you"
18
+ message: "Check your mobile for new message from us"
19
+ otp_not_sent:
20
+ heading: "OTP was not sent"
21
+ message: "There was some technical glitch and OTP was not sent. Try after some time"
22
+ otp_not_matching:
23
+ heading: "OTP verification was failed"
24
+ message: "Make sure that you enter the OTP correctly"
25
+ verification_failed:
26
+ heading: "OTP verification was failed"
27
+ message: "Check if you have properly given the OTP along with dialing prefix, mobile number & UUID"
28
+ verification_success:
29
+ heading: "OTP was verified succesfully"
30
+ message: "Now, accept the terms and conditions to finish the registration process and get API token"
31
+ tac_accepted:
32
+ heading: "You have successfully accepted the Terms & Conditions. Proceed with Registration process if any"
33
+ message: "Store and use the API token for further communication"
34
+ tac_not_accepted:
35
+ heading: "You have not accepted the Terms & Conditions. Registration is complete only if you accept the T&C"
36
+ message: "Accept the T&C to finish the Registration. Pass true"
37
+ profile:
38
+ user_already_exists:
39
+ heading: "A profile already exists for the mobile number you have provided"
40
+ message: "You are trying to create a profile once again when you already have a profile. Use Profile API with your API Token, to get your profile details and use them instead of creating a new one."
41
+ profile_created:
42
+ heading: "The Profile has been created successfully"
43
+ message: "You may access the profile API with API token to get the profile details in future"
@@ -1,25 +1,25 @@
1
1
  ar:
2
2
  authentication:
3
3
  permission_denied:
4
- heading: "Permission Denied"
5
- message: "You don't have permission to perform this action"
4
+ heading: "Permission Denied"
5
+ message: "You don't have permission to perform this action"
6
6
  session_expired:
7
- heading: "Session Expired"
8
- message: "Your session has been expired. Please sign in again"
7
+ heading: "Session Expired"
8
+ message: "Your session has been expired. Please sign in again"
9
9
  invalid_login:
10
- heading: "Invalid Login"
11
- message: "Invalid Username/Email or password."
10
+ heading: "Invalid Login"
11
+ message: "Invalid Username/Email or password."
12
12
  user_is_pending:
13
- heading: "Account Pending"
14
- message: "Your account is not yet approved, please contact administrator to activate your account"
13
+ heading: "Account Pending"
14
+ message: "Your account is not yet approved, please contact administrator to activate your account"
15
15
  user_is_suspended:
16
- heading: "Account Suspended"
17
- message: "Your account is suspended, please contact administrator"
16
+ heading: "Account Suspended"
17
+ message: "Your account is suspended, please contact administrator"
18
18
  logged_in:
19
- heading: "Signed In"
20
- message: "You have successfully signed in"
19
+ heading: "Signed In"
20
+ message: "You have successfully signed in"
21
21
  logged_out:
22
- heading: "Signed Out"
23
- message: "You have successfully signed out"
22
+ heading: "Signed Out"
23
+ message: "You have successfully signed out"
24
24
  masquerade: "لقد سجلت الدخول بنجاح - %{user}"
25
25
  sign_in_back: "You have successfully signed in back as %{user}"