From ca7b02d3eedf9e666d211a08830c5d5e678943d6 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Mon, 11 Dec 2023 16:59:13 +1100 Subject: [PATCH] Add basic description of Discover Regen app --- .../enterprises/form/_connected_apps.html.haml | 12 +++++++++++- app/webpacker/css/admin/all.scss | 1 + app/webpacker/css/admin/connected_apps.scss | 15 +++++++++++++++ app/webpacker/css/admin_v3/all.scss | 1 + config/locales/en.yml | 11 +++++++++++ .../admin/enterprises/connected_apps_spec.rb | 4 ++-- 6 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 app/webpacker/css/admin/connected_apps.scss diff --git a/app/views/admin/enterprises/form/_connected_apps.html.haml b/app/views/admin/enterprises/form/_connected_apps.html.haml index 15b48822d8..91ffce0db3 100644 --- a/app/views/admin/enterprises/form/_connected_apps.html.haml +++ b/app/views/admin/enterprises/form/_connected_apps.html.haml @@ -1 +1,11 @@ -in progress +%div + .connected-app__head + %div + %h3= t ".title" + %p= t ".tagline" + %div + %button + = t ".action" + %hr + .connected-app__description + = t ".description_html" diff --git a/app/webpacker/css/admin/all.scss b/app/webpacker/css/admin/all.scss index 075fe06797..942e7422e4 100644 --- a/app/webpacker/css/admin/all.scss +++ b/app/webpacker/css/admin/all.scss @@ -83,6 +83,7 @@ @import "alert"; @import "animations"; @import "change_type_form"; +@import "connected_apps"; @import "customers"; @import "dashboard_item"; @import "dashboard-single-ent"; diff --git a/app/webpacker/css/admin/connected_apps.scss b/app/webpacker/css/admin/connected_apps.scss new file mode 100644 index 0000000000..25be555a64 --- /dev/null +++ b/app/webpacker/css/admin/connected_apps.scss @@ -0,0 +1,15 @@ +.connected-app__head { + display: flex; + justify-content: space-between; + margin-bottom: 1em; + + h3 { + margin-bottom: 1em; + } +} + +.connected-app__description { + p { + margin-bottom: 1em; + } +} diff --git a/app/webpacker/css/admin_v3/all.scss b/app/webpacker/css/admin_v3/all.scss index 6e4fe6b7bb..a8125ef1f5 100644 --- a/app/webpacker/css/admin_v3/all.scss +++ b/app/webpacker/css/admin_v3/all.scss @@ -87,6 +87,7 @@ @import "../admin/alert"; @import "../admin/animations"; @import "pages/change_type_form"; // admin_v3 +@import "../admin/connected_apps"; @import "../admin/customers"; @import "dashboard/dashboard_item"; // admin_v3 @import "pages/dashboard-single-ent"; // admin_v3 diff --git a/config/locales/en.yml b/config/locales/en.yml index 845cf4b1e3..aea6a6f337 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1281,6 +1281,17 @@ en: custom_tab_content: "Content for custom tab" connected_apps: legend: "Connected apps" + title: "Discover Regenerative" + tagline: "Allow website to publish your enterprise information." + action: "Share data" + description_html: | +

+ Discover Regenerative makes it easier for buyers to discover + regenerative produce for their procurement, showcase producers that + are using regenerative farming practices, support connection + between buyers and producers within a trusted network. +

+

Visit website

actions: edit_profile: Settings properties: Properties diff --git a/spec/system/admin/enterprises/connected_apps_spec.rb b/spec/system/admin/enterprises/connected_apps_spec.rb index f9d5fa0950..a8a2e32e80 100644 --- a/spec/system/admin/enterprises/connected_apps_spec.rb +++ b/spec/system/admin/enterprises/connected_apps_spec.rb @@ -30,10 +30,10 @@ describe "Connected Apps", feature: :connected_apps do it "is visible" do visit edit_admin_enterprise_path(enterprise) - expect(page).to have_content "CONNECTED APPS" scroll_to :bottom click_link "Connected apps" - expect(page).to have_content "in progress" + expect(page).to have_content "Discover Regenerative" + expect(page).to have_button "Share data" end end