From 2d8eb1bf9487a63668895ff0f403f4a6e8ab75f0 Mon Sep 17 00:00:00 2001 From: Danielle Date: Fri, 1 Nov 2024 16:42:42 -0400 Subject: [PATCH] Sunrise data page (#234) --- pkg/web/pages.go | 6 +- pkg/web/routes.go | 3 +- .../templates/components/sunrise_header.html | 15 ++ .../components/transaction_rejection.html | 6 +- pkg/web/templates/layouts/sunrise.html | 19 +++ .../partials/sunrise/message_accept.html | 128 ++++++++++++++++++ pkg/web/templates/view_message.html | 26 ++++ 7 files changed, 200 insertions(+), 3 deletions(-) create mode 100644 pkg/web/templates/components/sunrise_header.html create mode 100644 pkg/web/templates/layouts/sunrise.html create mode 100644 pkg/web/templates/partials/sunrise/message_accept.html create mode 100644 pkg/web/templates/view_message.html diff --git a/pkg/web/pages.go b/pkg/web/pages.go index 6d310421..c777fb53 100644 --- a/pkg/web/pages.go +++ b/pkg/web/pages.go @@ -88,10 +88,14 @@ func (s *Server) SendMessageForm(c *gin.Context) { c.HTML(http.StatusOK, "send_message.html", scene.New(c)) } -func (s *Server) Verify(c *gin.Context) { +func (s *Server) VerifySunriseUser(c *gin.Context) { c.HTML(http.StatusOK, "verify.html", scene.New(c)) } +func (s *Server) SunriseMessagePreview(c *gin.Context) { + c.HTML(http.StatusOK, "view_message.html", scene.New(c)) +} + func (s *Server) TravelAddressUtility(c *gin.Context) { c.HTML(http.StatusOK, "traveladdress.html", scene.New(c)) } diff --git a/pkg/web/routes.go b/pkg/web/routes.go index 4a352987..2879f4ee 100644 --- a/pkg/web/routes.go +++ b/pkg/web/routes.go @@ -102,7 +102,8 @@ func (s *Server) setupRoutes() (err error) { s.router.GET("/transactions/:id/info", authenticate, s.TransactionsInfo) s.router.GET("/send-envelope", authenticate, s.SendEnvelopeForm) s.router.GET("/send-message", authenticate, s.SendMessageForm) - s.router.GET("/verify", authenticate, s.Verify) + s.router.GET("/verify", s.VerifySunriseUser) + s.router.GET("/sunrise-accept", s.SunriseMessagePreview) s.router.GET("/accounts", authenticate, s.Accounts) s.router.GET("/counterparty", authenticate, s.CounterpartyVasps) s.router.GET("/users", authenticate, s.UsersManagement) diff --git a/pkg/web/templates/components/sunrise_header.html b/pkg/web/templates/components/sunrise_header.html new file mode 100644 index 00000000..ea87b066 --- /dev/null +++ b/pkg/web/templates/components/sunrise_header.html @@ -0,0 +1,15 @@ +{{ define "sunrise_header" }} +
+ +
+{{ end }} \ No newline at end of file diff --git a/pkg/web/templates/components/transaction_rejection.html b/pkg/web/templates/components/transaction_rejection.html index b0fff584..6fbf028b 100644 --- a/pkg/web/templates/components/transaction_rejection.html +++ b/pkg/web/templates/components/transaction_rejection.html @@ -1,3 +1,5 @@ +{{ define "transaction_rejection" }} + - \ No newline at end of file + + +{{ end }} \ No newline at end of file diff --git a/pkg/web/templates/layouts/sunrise.html b/pkg/web/templates/layouts/sunrise.html new file mode 100644 index 00000000..0f795a7f --- /dev/null +++ b/pkg/web/templates/layouts/sunrise.html @@ -0,0 +1,19 @@ +{{ define "sunrise" }} + + + {{ template "head" . }} + + + {{ template "sunrise_header" . }} + +
+ {{ block "content" . }}{{ end }} +
+ + + + + {{ block "appcode" . }}{{ end }} + + +{{ end }} \ No newline at end of file diff --git a/pkg/web/templates/partials/sunrise/message_accept.html b/pkg/web/templates/partials/sunrise/message_accept.html new file mode 100644 index 00000000..cd48eca5 --- /dev/null +++ b/pkg/web/templates/partials/sunrise/message_accept.html @@ -0,0 +1,128 @@ +
+
+

TRANSACTION DETAILS

+ +
+
+
Amount
+
1.045
+
+
+
+
+

ORIGINATOR DETAILS

+ +
+
+
First Name
+
James
+
+
+
+
+ +
+
+
+
+

BENEFICIARY DETAILS

+
+ + +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+ + +
+
+
\ No newline at end of file diff --git a/pkg/web/templates/view_message.html b/pkg/web/templates/view_message.html new file mode 100644 index 00000000..c7403fb6 --- /dev/null +++ b/pkg/web/templates/view_message.html @@ -0,0 +1,26 @@ +{{ template "sunrise" . }} +{{ define "content" }} + +
+

+ Welcome to the Secure Travel Rule Data Exchange +

+

+ Review the travel rule data and provide the required beneficiary information to accept the + transaction. If you're not yet part of the TRISA network, consider joining + to streamline future Travel Rule compliance and secure data exchanges. +

+ + +
+ +
+ + +{{ template "transaction_rejection" . }} + +{{ end }} + +{{ define "appcode" }} + +{{ end }} \ No newline at end of file