diff --git a/.codeclimate.yml b/.codeclimate.yml index 5e16262da..213f7d172 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -57,3 +57,5 @@ exclude_patterns: - 'app/javascript/shared/constants/locales.js' - 'app/javascript/dashboard/helper/specs/macrosFixtures.js' - 'app/javascript/dashboard/routes/dashboard/settings/macros/constants.js' + - '**/fixtures/**' + - '**/*/fixtures.js' diff --git a/Gemfile b/Gemfile index f18305970..439b0f63e 100644 --- a/Gemfile +++ b/Gemfile @@ -49,7 +49,7 @@ gem 'aws-sdk-s3', require: false # original gem isn't maintained actively # we wanted updated version of faraday which is a dependency for slack-ruby-client gem 'azure-storage-blob', git: 'https://github.com/chatwoot/azure-storage-ruby', branch: 'chatwoot', require: false -gem 'google-cloud-storage', require: false +gem 'google-cloud-storage', '>= 1.48.0', require: false gem 'image_processing' ##-- gems for database --# diff --git a/Gemfile.lock b/Gemfile.lock index e2f5c91be..298d8e041 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -209,7 +209,7 @@ GEM devise (> 3.5.2, < 5) rails (>= 4.2.0, < 7.2) diff-lcs (1.5.1) - digest-crc (0.6.4) + digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) docile (1.4.0) domain_name (0.5.20190701) @@ -284,39 +284,39 @@ GEM activesupport (>= 6.1) gmail_xoauth (0.4.3) oauth (>= 0.3.6) - google-apis-core (0.11.0) + google-apis-core (0.15.1) addressable (~> 2.5, >= 2.5.1) - googleauth (>= 0.16.2, < 2.a) - httpclient (>= 2.8.1, < 3.a) + googleauth (~> 1.9) + httpclient (>= 2.8.3, < 3.a) mini_mime (~> 1.0) + mutex_m representable (~> 3.0) retriable (>= 2.0, < 4.a) - rexml - webrick - google-apis-iamcredentials_v1 (0.17.0) - google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.19.0) - google-apis-core (>= 0.9.0, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) + google-apis-iamcredentials_v1 (0.22.0) + google-apis-core (>= 0.15.0, < 2.a) + google-apis-storage_v1 (0.47.0) + google-apis-core (>= 0.15.0, < 2.a) + google-cloud-core (1.7.1) + google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-dialogflow-v2 (0.31.0) gapic-common (>= 0.20.0, < 2.a) google-cloud-errors (~> 1.0) google-cloud-location (>= 0.4, < 2.a) - google-cloud-env (1.6.0) - faraday (>= 0.17.3, < 3.0) + google-cloud-env (2.2.1) + faraday (>= 1.0, < 3.a) google-cloud-errors (1.3.1) google-cloud-location (0.6.0) gapic-common (>= 0.20.0, < 2.a) google-cloud-errors (~> 1.0) - google-cloud-storage (1.44.0) + google-cloud-storage (1.52.0) addressable (~> 2.8) digest-crc (~> 0.4) - google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.19.0) + google-apis-core (~> 0.13) + google-apis-iamcredentials_v1 (~> 0.18) + google-apis-storage_v1 (~> 0.38) google-cloud-core (~> 1.6) - googleauth (>= 0.16.2, < 2.a) + googleauth (~> 1.9) mini_mime (~> 1.0) google-cloud-translate-v3 (0.10.0) gapic-common (>= 0.20.0, < 2.a) @@ -331,10 +331,10 @@ GEM grpc (~> 1.41) googleapis-common-protos-types (1.14.0) google-protobuf (~> 3.18) - googleauth (1.5.2) - faraday (>= 0.17.3, < 3.a) + googleauth (1.11.2) + faraday (>= 1.0, < 3.a) + google-cloud-env (~> 2.1) jwt (>= 1.4, < 3.0) - memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) @@ -452,7 +452,7 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -462,7 +462,6 @@ GEM net-smtp marcel (1.0.4) maxminddb (0.1.22) - memoist (0.16.2) meta_request (0.8.3) rack-contrib (>= 1.1, < 3) railties (>= 3.0.0, < 8) @@ -472,7 +471,7 @@ GEM mime-types-data (3.2023.0218.1) mini_magick (4.12.0) mini_mime (1.1.5) - mini_portile2 (2.8.7) + mini_portile2 (2.8.8) minitest (5.25.1) mock_redis (0.36.0) ruby2_keywords @@ -480,6 +479,7 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) + mutex_m (0.3.0) neighbor (0.2.3) activerecord (>= 5.2) net-http (0.4.1) @@ -502,14 +502,14 @@ GEM newrelic_rpm (9.6.0) base64 nio4r (2.7.3) - nokogiri (1.16.7) + nokogiri (1.16.8) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.7-arm64-darwin) + nokogiri (1.16.8-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-darwin) + nokogiri (1.16.8-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-linux) + nokogiri (1.16.8-x86_64-linux) racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) @@ -599,9 +599,9 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.1) loofah (~> 2.21) - nokogiri (~> 1.14) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) railties (7.0.8.5) actionpack (= 7.0.8.5) activesupport (= 7.0.8.5) @@ -824,7 +824,6 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.2) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -886,7 +885,7 @@ DEPENDENCIES geocoder gmail_xoauth google-cloud-dialogflow-v2 (>= 0.24.0) - google-cloud-storage + google-cloud-storage (>= 1.48.0) google-cloud-translate-v3 (>= 0.7.0) groupdate grpc diff --git a/app.json b/app.json index d50040814..08e725c8e 100644 --- a/app.json +++ b/app.json @@ -48,7 +48,7 @@ "size": "basic" } }, - "stack": "heroku-20", + "stack": "heroku-24", "image": "heroku/ruby", "addons": [ { @@ -58,7 +58,7 @@ "plan": "heroku-postgresql:essential-0" } ], - "stack": "heroku-20", + "stack": "heroku-24", "buildpacks": [ { "url": "heroku/nodejs" diff --git a/app/controllers/api/v1/profiles_controller.rb b/app/controllers/api/v1/profiles_controller.rb index bd3c2673c..ae1a1fe30 100644 --- a/app/controllers/api/v1/profiles_controller.rb +++ b/app/controllers/api/v1/profiles_controller.rb @@ -17,7 +17,7 @@ class Api::V1::ProfilesController < Api::BaseController def avatar @user.avatar.attachment.destroy! if @user.avatar.attached? - head :ok + @user.reload end def auto_offline diff --git a/app/javascript/dashboard/assets/scss/_date-picker.scss b/app/javascript/dashboard/assets/scss/_date-picker.scss index 92deab095..2fa577673 100644 --- a/app/javascript/dashboard/assets/scss/_date-picker.scss +++ b/app/javascript/dashboard/assets/scss/_date-picker.scss @@ -25,7 +25,7 @@ } .mx-input { - @apply h-[2.5rem] flex border border-solid border-slate-200 dark:border-slate-600 rounded-md shadow-none; + @apply h-[2.5rem] flex border border-solid border-n-weak rounded-md shadow-none; } .mx-input:disabled, @@ -39,7 +39,7 @@ } .mx-datepicker-main { - @apply border-0 bg-white dark:bg-slate-800; + @apply border-0 bg-n-solid-2 rounded-xl; .cell { &.disabled { @@ -53,6 +53,14 @@ } } + .mx-calendar+.mx-calendar { + @apply border-l border-n-weak; + } + + .mx-datepicker-footer { + @apply border border-n-weak; + } + .mx-time { @apply border-0 bg-white dark:bg-slate-800; diff --git a/app/javascript/dashboard/components-next/Contacts/ContactLabels/ContactLabels.vue b/app/javascript/dashboard/components-next/Contacts/ContactLabels/ContactLabels.vue new file mode 100644 index 000000000..255c1b113 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactLabels/ContactLabels.vue @@ -0,0 +1,108 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.vue b/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.vue new file mode 100644 index 000000000..9875ae2ac --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsCard/ContactsCard.vue @@ -0,0 +1,172 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsCard/story/ContactsCard.story.vue b/app/javascript/dashboard/components-next/Contacts/ContactsCard/story/ContactsCard.story.vue new file mode 100644 index 000000000..3f8d5a411 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsCard/story/ContactsCard.story.vue @@ -0,0 +1,67 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsCard/story/fixtures.js b/app/javascript/dashboard/components-next/Contacts/ContactsCard/story/fixtures.js new file mode 100644 index 000000000..67bdba9b4 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsCard/story/fixtures.js @@ -0,0 +1,149 @@ +export default [ + { + additionalAttributes: { + socialProfiles: {}, + }, + availabilityStatus: null, + email: 'johndoe@chatwoot.com', + id: 370, + name: 'John Doe', + phoneNumber: '+918634322418', + identifier: null, + thumbnail: 'https://api.dicebear.com/9.x/thumbs/svg?seed=Felix', + customAttributes: {}, + lastActivityAt: 1731608270, + createdAt: 1731586271, + }, + { + additionalAttributes: { + city: 'kerala', + country: 'India', + description: 'Curious about the web. ', + companyName: 'Chatwoot', + countryCode: '', + socialProfiles: { + github: 'abozler', + twitter: 'ozler', + facebook: 'abozler', + linkedin: 'abozler', + instagram: 'ozler', + }, + }, + availabilityStatus: null, + email: 'ozler@chatwoot.com', + id: 29, + name: 'Abraham Ozlers', + phoneNumber: '+246232222222', + identifier: null, + thumbnail: 'https://api.dicebear.com/9.x/thumbs/svg?seed=Upload', + customAttributes: { + dateContact: '2024-02-01T00:00:00.000Z', + linkContact: 'https://staging.chatwoot.com/app/accounts/3/contacts-new', + listContact: 'Not spam', + numberContact: '12', + }, + lastActivityAt: 1712127410, + createdAt: 1712127389, + }, + { + additionalAttributes: { + city: 'Kerala', + country: 'India', + description: + "I'm Candice developer focusing on building things for the web šŸŒ. Currently, I’m working as a Product Developer here at @chatwootapp āš”ļøšŸ”„", + companyName: 'Chatwoot', + countryCode: 'IN', + socialProfiles: { + github: 'cmathersonj', + twitter: 'cmather', + facebook: 'cmathersonj', + linkedin: 'cmathersonj', + instagram: 'cmathersonjs', + }, + }, + availabilityStatus: null, + email: 'cmathersonj@va.test', + id: 22, + name: 'Candice Matherson', + phoneNumber: '+917474774742', + identifier: null, + thumbnail: 'https://api.dicebear.com/9.x/thumbs/svg?seed=Emery', + customAttributes: { + dateContact: '2024-11-12T03:23:06.963Z', + linkContact: 'https://sd.sd', + textContact: 'hey', + numberContact: '12', + checkboxContact: true, + }, + lastActivityAt: 1712123233, + createdAt: 1712123233, + }, + { + additionalAttributes: { + city: '', + country: '', + description: '', + companyName: '', + countryCode: '', + socialProfiles: { + github: '', + twitter: '', + facebook: '', + linkedin: '', + instagram: '', + }, + }, + availabilityStatus: null, + email: 'ofolkardi@taobao.test', + id: 21, + name: 'Ophelia Folkard', + phoneNumber: '', + identifier: null, + thumbnail: + 'https://sivin-tunnel.chatwoot.dev/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBPZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--08dcac8eb72ef12b2cad92d58dddd04cd8a5f513/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RTNKbGMybDZaVjkwYjE5bWFXeHNXd2RwQWZvdyIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--df796c2af3c0153e55236c2f3cf3a199ac2cb6f7/32.jpg', + customAttributes: {}, + lastActivityAt: 1712123233, + createdAt: 1712123233, + }, + { + additionalAttributes: { + socialProfiles: {}, + }, + availabilityStatus: null, + email: 'wcasteloth@exblog.jp', + id: 20, + name: 'Willy Castelot', + phoneNumber: '+919384', + identifier: null, + thumbnail: 'https://api.dicebear.com/9.x/thumbs/svg?seed=Jade', + customAttributes: {}, + lastActivityAt: 1712123233, + createdAt: 1712123233, + }, + { + additionalAttributes: { + city: '', + country: '', + description: '', + companyName: '', + countryCode: '', + socialProfiles: { + github: '', + twitter: '', + facebook: '', + linkedin: '', + instagram: '', + }, + }, + availabilityStatus: null, + email: 'ederingtong@printfriendly.test', + id: 19, + name: 'Elisabeth Derington', + phoneNumber: '', + identifier: null, + thumbnail: 'https://api.dicebear.com/9.x/avataaars/svg?seed=Jade', + customAttributes: {}, + lastActivityAt: 1712123232, + createdAt: 1712123232, + }, +]; diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsDetailsLayout.vue b/app/javascript/dashboard/components-next/Contacts/ContactsDetailsLayout.vue new file mode 100644 index 000000000..6e7d42bc9 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsDetailsLayout.vue @@ -0,0 +1,83 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/ConfirmContactDeleteDialog.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ConfirmContactDeleteDialog.vue new file mode 100644 index 000000000..d9c0deb1b --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ConfirmContactDeleteDialog.vue @@ -0,0 +1,58 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactExportDialog.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactExportDialog.vue new file mode 100644 index 000000000..d2b57cbb8 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactExportDialog.vue @@ -0,0 +1,66 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactImportDialog.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactImportDialog.vue new file mode 100644 index 000000000..acb8f0f1c --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactImportDialog.vue @@ -0,0 +1,134 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactMergeForm.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactMergeForm.vue new file mode 100644 index 000000000..8adcce6b2 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactMergeForm.vue @@ -0,0 +1,112 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactsForm.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactsForm.vue new file mode 100644 index 000000000..b6b24ce26 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/ContactsForm.vue @@ -0,0 +1,315 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateNewContactDialog.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateNewContactDialog.vue new file mode 100644 index 000000000..806fcf4ac --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateNewContactDialog.vue @@ -0,0 +1,68 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateSegmentDialog.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateSegmentDialog.vue new file mode 100644 index 000000000..a246c742c --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/CreateSegmentDialog.vue @@ -0,0 +1,71 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/DeleteSegmentDialog.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/DeleteSegmentDialog.vue new file mode 100644 index 000000000..60aa0e55e --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/DeleteSegmentDialog.vue @@ -0,0 +1,43 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/ContactMergeForm.story.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/ContactMergeForm.story.vue new file mode 100644 index 000000000..dbf22dadd --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/ContactMergeForm.story.vue @@ -0,0 +1,73 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/ContactsForm.story.vue b/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/ContactsForm.story.vue new file mode 100644 index 000000000..306df1df0 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/ContactsForm.story.vue @@ -0,0 +1,80 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/fixtures.js b/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/fixtures.js new file mode 100644 index 000000000..9d9590d63 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsForm/story/fixtures.js @@ -0,0 +1,47 @@ +export const contactData = { + id: 370, + name: 'John Doe', + email: 'johndoe@chatwoot.com', + phoneNumber: '+918634322418', + additionalAttributes: { + city: 'Kerala', + country: 'India', + description: 'Curious about the web.', + companyName: 'Chatwoot', + countryCode: 'IN', + socialProfiles: { + github: 'johndoe', + twitter: 'johndoe', + facebook: 'johndoe', + linkedin: 'johndoe', + instagram: 'johndoe', + }, + }, +}; + +export const primaryContactList = [ + { + id: 1, + name: 'Jane Smith', + email: 'jane@chatwoot.com', + thumbnail: '', + label: '(ID: 1) Jane Smith', + value: 1, + }, + { + id: 2, + name: 'Mike Johnson', + email: 'mike@chatwoot.com', + thumbnail: '', + label: '(ID: 2) Mike Johnson', + value: 2, + }, + { + id: 3, + name: 'Sarah Wilson', + email: 'sarah@chatwoot.com', + thumbnail: '', + label: '(ID: 3) Sarah Wilson', + value: 3, + }, +]; diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsHeader/ContactHeader.vue b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/ContactHeader.vue new file mode 100644 index 000000000..4406a996c --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/ContactHeader.vue @@ -0,0 +1,142 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsHeader/ContactListHeaderWrapper.vue b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/ContactListHeaderWrapper.vue new file mode 100644 index 000000000..8b2a53b27 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/ContactListHeaderWrapper.vue @@ -0,0 +1,306 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactMoreActions.vue b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactMoreActions.vue new file mode 100644 index 000000000..c37a7854c --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactMoreActions.vue @@ -0,0 +1,62 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactSortMenu.vue b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactSortMenu.vue new file mode 100644 index 000000000..edf4bd70f --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactSortMenu.vue @@ -0,0 +1,138 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactsActiveFiltersPreview.vue b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactsActiveFiltersPreview.vue new file mode 100644 index 000000000..65d7de044 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/components/ContactsActiveFiltersPreview.vue @@ -0,0 +1,30 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsHeader/story/ContactHeader.story.vue b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/story/ContactHeader.story.vue new file mode 100644 index 000000000..a89aa724c --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsHeader/story/ContactHeader.story.vue @@ -0,0 +1,106 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsListLayout.vue b/app/javascript/dashboard/components-next/Contacts/ContactsListLayout.vue new file mode 100644 index 000000000..9bede6795 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsListLayout.vue @@ -0,0 +1,130 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributeItem.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributeItem.vue new file mode 100644 index 000000000..dc52d8912 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributeItem.vue @@ -0,0 +1,95 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributes.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributes.vue new file mode 100644 index 000000000..f2a5c1ee8 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactCustomAttributes.vue @@ -0,0 +1,129 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue new file mode 100644 index 000000000..5e536fbe0 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactHistory.vue @@ -0,0 +1,57 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactMerge.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactMerge.vue new file mode 100644 index 000000000..65cbfafe2 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactMerge.vue @@ -0,0 +1,142 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactNotes.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactNotes.vue new file mode 100644 index 000000000..dfe3f437c --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/ContactNotes.vue @@ -0,0 +1,99 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ContactNoteItem.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ContactNoteItem.vue new file mode 100644 index 000000000..81f7a147f --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ContactNoteItem.vue @@ -0,0 +1,63 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/story/ContactNoteItem.story.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/story/ContactNoteItem.story.vue new file mode 100644 index 000000000..0dbf8bf01 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/story/ContactNoteItem.story.vue @@ -0,0 +1,39 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/story/fixtures.js b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/story/fixtures.js new file mode 100644 index 000000000..440ad95df --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/story/fixtures.js @@ -0,0 +1,69 @@ +export default [ + { + id: 12, + content: + 'This tutorial will show you how to use Chatwoot and, hence, ensure you practice effective customer communication. We will explain in detail the following:\n\n* Step-by-step setup of your account, with illustrative screenshots.\n\n* An in-depth explanation of all the core features of Chatwoot.\n\n* Get your account up and running by the end of this tutorial.\n\n* Basic concepts of customer communication.', + accountId: null, + contactId: null, + user: { + id: 30, + account_id: 2, + availability_status: 'offline', + auto_offline: true, + confirmed: true, + email: 'bruce@paperlayer.test', + available_name: 'Bruce', + name: 'Bruce', + role: 'administrator', + thumbnail: + 'https://sivin-tunnel.chatwoot.dev/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBJZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--515dbb35e9ba3c36d14f4c4b77220a675513c1fb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RTNKbGMybDZaVjkwYjE5bWFXeHNXd2RwQWZvdyIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--df796c2af3c0153e55236c2f3cf3a199ac2cb6f7/2.jpg', + custom_role_id: null, + }, + createdAt: 1730786556, + updatedAt: 1730786556, + }, + { + id: 10, + content: + 'We discussed a couple of things:\n\n* Product offering and how it can be useful to talk with people.\n\n* They’ll reach out to us after an internal review.', + accountId: null, + contactId: null, + user: { + id: 1, + account_id: 2, + availability_status: 'online', + auto_offline: false, + confirmed: true, + email: 'hillary@chatwoot.com', + available_name: 'Hillary', + name: 'Hillary', + role: 'administrator', + thumbnail: '', + custom_role_id: null, + }, + createdAt: 1730782566, + updatedAt: 1730782566, + }, + { + id: 9, + content: + 'We discussed a couple of things:\n\n* Product offering and how it can be useful to talk with people.\n\n* They’ll reach out to us after an internal review.', + accountId: null, + contactId: null, + user: { + id: 1, + account_id: 2, + availability_status: 'online', + auto_offline: false, + confirmed: true, + email: 'john@chatwoot.com', + available_name: 'John', + name: 'John', + role: 'administrator', + thumbnail: '', + custom_role_id: null, + }, + createdAt: 1730782564, + updatedAt: 1730782564, + }, +]; diff --git a/app/javascript/dashboard/components-next/Contacts/EmptyState/ContactEmptyState.story.vue b/app/javascript/dashboard/components-next/Contacts/EmptyState/ContactEmptyState.story.vue new file mode 100644 index 000000000..0c1998a84 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/EmptyState/ContactEmptyState.story.vue @@ -0,0 +1,28 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/EmptyState/ContactEmptyState.vue b/app/javascript/dashboard/components-next/Contacts/EmptyState/ContactEmptyState.vue new file mode 100644 index 000000000..f6f5ddaf6 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/EmptyState/ContactEmptyState.vue @@ -0,0 +1,66 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/EmptyState/contactEmptyStateContent.js b/app/javascript/dashboard/components-next/Contacts/EmptyState/contactEmptyStateContent.js new file mode 100644 index 000000000..6d80c9151 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/EmptyState/contactEmptyStateContent.js @@ -0,0 +1,228 @@ +export default [ + { + additionalAttributes: { + city: 'Los Angeles', + country: 'United States', + description: + "I'm Candice, a developer focusing on building web solutions. Currently, I’m working as a Product Developer at Chatwoot.", + companyName: 'Chatwoot', + countryCode: 'US', + socialProfiles: { + github: 'candice-dev', + twitter: 'candice_w_dev', + facebook: 'candice.dev', + linkedin: 'candice-matherson', + instagram: 'candice.codes', + }, + }, + availabilityStatus: 'offline', + email: 'candice.matherson@chatwoot.com', + id: 22, + name: 'Candice Matherson', + phoneNumber: '+14155552671', + identifier: null, + thumbnail: '', + customAttributes: { + dateContact: '2024-11-11T11:53:09.299Z', + linkContact: 'https://example.com', + listContact: 'Follow-Up', + textContact: 'Hi there!', + numberContact: '42', + checkboxContact: false, + }, + lastActivityAt: 1712123233, + createdAt: 1712123233, + }, + { + additionalAttributes: { + city: 'San Francisco', + country: 'United States', + description: 'Passionate about design and user experience.', + companyName: 'Designify', + countryCode: 'US', + socialProfiles: { + github: 'ophelia-folkard', + twitter: 'oph_designs', + facebook: 'ophelia.folkard', + linkedin: 'ophelia-folkard', + instagram: 'ophelia.design', + }, + }, + availabilityStatus: 'offline', + email: 'ophelia.folkard@designify.com', + id: 21, + name: 'Ophelia Folkard', + phoneNumber: '+14155552672', + identifier: null, + thumbnail: '', + customAttributes: { + dateContact: '2024-10-05T10:12:34.567Z', + linkContact: 'https://designify.com', + listContact: 'Prospects', + textContact: 'Looking forward to connecting!', + }, + lastActivityAt: 1712123233, + createdAt: 1712123233, + }, + { + additionalAttributes: { + city: 'Austin', + country: 'United States', + description: 'Avid coder and tech enthusiast.', + companyName: 'CodeHub', + countryCode: 'US', + socialProfiles: { + github: 'willy_castelot', + twitter: 'willy_code', + facebook: 'willy.castelot', + linkedin: 'willy-castelot', + instagram: 'willy.coder', + }, + }, + availabilityStatus: 'offline', + email: 'willy.castelot@codehub.io', + id: 20, + name: 'Willy Castelot', + phoneNumber: '+14155552673', + identifier: null, + thumbnail: '', + customAttributes: { + textContact: 'Let’s collaborate!', + checkboxContact: true, + }, + lastActivityAt: 1712123233, + createdAt: 1712123233, + }, + { + additionalAttributes: { + city: 'Seattle', + country: 'United States', + description: 'Product manager with a love for innovation.', + companyName: 'InnovaTech', + countryCode: 'US', + socialProfiles: { + github: 'elisabeth-d', + twitter: 'elisabeth_innova', + facebook: 'elisabeth.derington', + linkedin: 'elisabeth-derington', + instagram: 'elisabeth.innovates', + }, + }, + availabilityStatus: 'offline', + email: 'elisabeth.derington@innova.com', + id: 19, + name: 'Elisabeth Derington', + phoneNumber: '+14155552674', + identifier: null, + thumbnail: '', + customAttributes: { + textContact: 'Let’s schedule a call.', + }, + lastActivityAt: 1712123232, + createdAt: 1712123232, + }, + { + additionalAttributes: { + city: 'Chicago', + country: 'United States', + description: 'Marketing specialist and content creator.', + companyName: 'Contently', + countryCode: 'US', + socialProfiles: { + github: 'olia-olenchenko', + twitter: 'olia_content', + facebook: 'olia.olenchenko', + linkedin: 'olia-olenchenko', + instagram: 'olia.creates', + }, + }, + availabilityStatus: 'offline', + email: 'olia.olenchenko@contently.com', + id: 18, + name: 'Olia Olenchenko', + phoneNumber: '+14155552675', + identifier: null, + thumbnail: '', + customAttributes: {}, + lastActivityAt: 1712123232, + createdAt: 1712123232, + }, + { + additionalAttributes: { + city: 'Boston', + country: 'United States', + description: 'SEO expert and analytics enthusiast.', + companyName: 'OptiSearch', + countryCode: 'US', + socialProfiles: { + github: 'nate-vannuchi', + twitter: 'nate_seo', + facebook: 'nathaniel.vannuchi', + linkedin: 'nathaniel-vannuchi', + instagram: 'nate.optimizes', + }, + }, + availabilityStatus: 'offline', + email: 'nathaniel.vannuchi@optisearch.com', + id: 17, + name: 'Nathaniel Vannuchi', + phoneNumber: '+14155552676', + identifier: null, + thumbnail: '', + customAttributes: {}, + lastActivityAt: 1712123232, + createdAt: 1712123232, + }, + { + additionalAttributes: { + city: 'Denver', + country: 'United States', + description: 'UI/UX designer with a flair for minimalist designs.', + companyName: 'Minimal Designs', + countryCode: 'US', + socialProfiles: { + github: 'merrile-petruk', + twitter: 'merrile_ux', + facebook: 'merrile.petruk', + linkedin: 'merrile-petruk', + instagram: 'merrile.designs', + }, + }, + availabilityStatus: 'offline', + email: 'merrile.petruk@minimal.com', + id: 16, + name: 'Merrile Petruk', + phoneNumber: '+14155552677', + identifier: null, + thumbnail: '', + customAttributes: {}, + lastActivityAt: 1712123232, + createdAt: 1712123232, + }, + { + additionalAttributes: { + city: 'Miami', + country: 'United States', + description: 'Entrepreneur with a background in e-commerce.', + companyName: 'Ecom Solutions', + countryCode: 'US', + socialProfiles: { + github: 'cordell-d', + twitter: 'cordell_entrepreneur', + facebook: 'cordell.dalinder', + linkedin: 'cordell-dalinder', + instagram: 'cordell.ecom', + }, + }, + availabilityStatus: 'offline', + email: 'cordell.dalinder@ecomsolutions.com', + id: 15, + name: 'Cordell Dalinder', + phoneNumber: '+14155552678', + identifier: null, + thumbnail: '', + customAttributes: {}, + lastActivityAt: 1712123232, + createdAt: 1712123232, + }, +]; diff --git a/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue b/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue new file mode 100644 index 000000000..3f92df408 --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/Pages/ContactDetails.vue @@ -0,0 +1,183 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/Pages/ContactsList.vue b/app/javascript/dashboard/components-next/Contacts/Pages/ContactsList.vue new file mode 100644 index 000000000..33532edcf --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/Pages/ContactsList.vue @@ -0,0 +1,81 @@ + + + diff --git a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue index dfa31e100..a81c80b87 100644 --- a/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue +++ b/app/javascript/dashboard/components-next/Conversation/ConversationCard/CardMessagePreview.vue @@ -1,6 +1,7 @@