-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* find duplicates draft * include custom fields * dry joins * ignore null values * ignore unverified and disabled contacts * add index * increase threshold * basic UI * add page title * write results in db * add detail page * highlight equal values * add ui to compare duplicates * retrieve duplicates in both ways * fix id select fragmen * add weight for custom fields * include in duplicate query * implement weight in query and consider admin values * refactor custom field pattern matches * add hint * add test case * make combination unique and update type accordingly * add contact unspecifiv view * implement access * migrate default permissions * fix insert duplicates query * add unique combination constraint * merge duplicates * replace multiple events with one transaction * update all rows on merge * changelog WIP * changelog * add user_users uuid index * add integration test * fix test cases * remove unused function * remove comments and unused functions * create changelogs * pass user_uuid to merge * remove duplicates after mergin * add service * represent score as percentagre * add migration to insert default weight * add counters and verified timestamps to duplicate screen * archive email address of deleted user * add notification to dashboard * resolve mr discussions * get rid of exit 0 commands * seed default weight * fix list duplicates query * adjust weighting and add hint * fix ignore redirect * add toggle all buttons
- Loading branch information
Showing
91 changed files
with
3,487 additions
and
755 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include Entity | ||
|
||
let insert_request = Repo.insert_request |
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,5 @@ | ||
module Reason : sig | ||
type t = MergedDuplicate | ||
end | ||
|
||
val insert_request : (string * Reason.t, unit, [ `Zero ]) Caqti_request.t |
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,17 @@ | ||
(library | ||
(name archived_email) | ||
(libraries pool_common pool_user utils) | ||
(preprocess | ||
(pps | ||
lwt_ppx | ||
ppx_string | ||
ppx_deriving.enum | ||
ppx_deriving.eq | ||
ppx_deriving.ord | ||
ppx_deriving.show | ||
ppx_fields_conv | ||
ppx_sexp_conv | ||
ppx_variants_conv | ||
ppx_yojson_conv))) | ||
|
||
(include_subdirs unqualified) |
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,13 @@ | ||
module Reason = struct | ||
module Core = struct | ||
let field = Pool_message.Field.MessageChannel | ||
|
||
type t = | ||
| MergedDuplicate [@name "merged_duplicate"] | ||
[@printer Utils.ppx_printer "merged_duplicate"] | ||
[@@deriving enum, eq, ord, sexp_of, show { with_path = false }, yojson] | ||
end | ||
|
||
include Pool_model.Base.SelectorType (Core) | ||
include Core | ||
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,30 @@ | ||
open Caqti_request.Infix | ||
open CCFun.Infix | ||
|
||
module Email = struct | ||
let t = | ||
let open Utils.Crypto.String in | ||
Pool_common.Repo.make_caqti_type | ||
Caqti_type.string | ||
(decrypt_from_string | ||
%> CCResult.map_err (fun _ -> Pool_message.(Error.Decode Field.Email))) | ||
encrypt_to_string | ||
;; | ||
end | ||
|
||
module Reason = Pool_common.Repo.Model.SelectorType (Entity.Reason) | ||
|
||
let insert_request = | ||
{sql| | ||
INSERT INTO pool_archived_email_addresses ( | ||
uuid, | ||
email, | ||
reason | ||
) VALUES ( | ||
UNHEX(REPLACE(UUID(), '-', '')), | ||
$1, | ||
$2 | ||
) | ||
|sql} | ||
|> Caqti_type.(t2 Email.t Reason.t ->. unit) | ||
;; |
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
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.