-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from internetee/verify-contacts
Added contact verification request feature
- Loading branch information
Showing
27 changed files
with
2,068 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApiConnector | ||
module Contacts | ||
class PoiDownloader < ApiConnector | ||
ACTION = 'download_poi' | ||
ENDPOINT = { | ||
method: 'get', | ||
endpoint: '/contacts/download_poi', | ||
}.freeze | ||
|
||
def download_poi(params = {}) | ||
request(url: url_with_id(params[:id]), | ||
method: method) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApiConnector | ||
module Contacts | ||
class Verifier < ApiConnector | ||
ACTION = 'verify_contact' | ||
ENDPOINT = { | ||
method: 'post', | ||
endpoint: '/contacts/verify', | ||
}.freeze | ||
|
||
def verify_contact(params = {}) | ||
request(url: url_with_id(params[:id]), | ||
method: method) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="dialog" id="contact_verify"> | ||
<div class="wrapper wrapper__small"> | ||
<div class="paper paper--text__left"> | ||
<div class="paper--header"> | ||
<%= button_tag(class: 'button--close', type: '') do %> | ||
<i class="fas fa-times"></i> | ||
<% end %> | ||
<h2 id="title"><%= t('contacts.show.verify_confirm_html', code: @contact[:code]) %></h2> | ||
</div> | ||
<div class="paper--content"> | ||
<%= button_to t(:send), verify_contact_path(contact_code: @contact[:code]), data: { turbo: false }, class: 'button button--primary' %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.