Commit graph

374 commits

Author SHA1 Message Date
Dillon-Brown
8271d66178 Update User entity to match types with pre-existing legacy database
- Update User entity.
- Update schema_filters to only allow doctrine interaction with the users and migration_versions tables.
- Set auto_generate_proxy_classes to false since we don't need proxy classes.
- Updated broken ORM and doctrine mappings.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
5a8f382f03 Refactor all existing namespaces
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Clemente Raposo
139ad660b8 Add RecordView configurable TopWidgets
- Structure re-factor
-- Move record view components to record view folder
-- Move record view store to record view folder
-- Add containers folder
--- add @containers alias
-- Move Subpanels to containers folder
-- Move subpanel-statistics.store to single-value-statistics.store

- Make administration repair a cache reset action

- Add dynamic top widget component
- Add statistics top widget component
- Add support for recordView defs topWidget configuration

- Adjust and standardize Statistic API structure
-- Add metadata to response.
--- Metadata should drive widgets behavior
-- Change existing StatisticsProviderInterface implementations to send back metadata

- Add SubpanelDataQueryHandler to make custom queries easier
-- Allows to get the query done to fetch subpanel data
-- Allows to run custom queries
- Add WonOpportunityAmountByYear using custom query
- Implement SubpanelOpportunitiesTotal using custom query

- Add karma/jasmine tests
2021-03-30 19:22:31 +01:00
Dillon-Brown
4cd53cc6fd Refactor authentication to use application/json
- Sending by JSON is the preferred choice for API platform.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
a3aaa0c5fc Set web profiler config
- This will be automatically disabled in production environments

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
8235e46b2d Update Composer
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
6734f26d98 Implement CSRF protection
- Remove outdated CSRF package
- Implement core CSRF protection

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Clemente Raposo
8208fa65b3 Add new routing config 2021-03-30 19:22:31 +01:00
Clemente Raposo
b7059f7645 Fix record view access errors
- Use classic view for some modules
- Add support for minimal detailviewdefs configuration
2021-03-30 19:22:30 +01:00
Clemente Raposo
d062e56cd8 Add subpanel stats
- Retrieve the subpanel stats from backend
-- with mock data for now
- Display inline loading spinner while the stats are being retrieved
- Render stats using field component
- Add statistics api, resolvers and data providers
- Add statistics provider registry
- Add the needed statistics providers for each subpanel type
-- return mock data for now
- Add inline loading spinner component
2021-03-30 19:22:30 +01:00
Clemente Raposo
deed1ef4d5 Make Module icons themable
- Move module icons to suite 8 side images
- Update all module icon svgs to be themable using css
-- They should support using css stroke and fill to change color
2021-03-30 19:22:30 +01:00
Clemente Raposo
8829495f50 Subpanel data retrieval
- Add ability to defined preset data handlers
-- Extract regular list view data logic to ListDataHandler.php
-- Add PresetListDataHandlerInterface.php and PresetListDataHandlers.php to give the ability do define a preset query
-- Add logic to RecordListHandler.php to use the preset data handler if the preset info is passed on the criteria.
- Update subpanel stores in front end
-- Initialize store proper subpanel criteria
-- Initialize subpanel stores within recordView store.
-- Trigger subpanel data load on subpanel display
- Update subpanel
-- Update styling
-- enable minimize button
- Update table
-- Add loading
2021-03-30 19:22:30 +01:00
Dillon-Brown
5579401a1f Implement routing configuration
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:30 +01:00
Clemente Raposo
0010232df3 Remove subpanel suite8 side configuration
- Use title provided in layout defs for each module
- Use module icon as subpanel icon
2021-03-30 19:22:30 +01:00
codeph0y
56d97d726e Add subpanel buttons 2021-03-30 19:22:29 +01:00
Clemente Raposo
357b052293 Add button group component
- Add button group component
- Add dropdown submenu component
- Apply button group to listview actions menu
- Apply button group to listview settings menu
- Add actions and settings menu limit size based configuration
- Re-factor columnchooser component to be able to call dynamically
- Fix console error on app component
- Add unit tests
2021-03-30 19:21:40 +01:00
Dillon-Brown
c5ee6b4f8e Implement record-view routing
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:39 +01:00
Pedro Ernst
c2b92c8967 Line Actions Fixes
Correctly set labels on line actions
Increase spacing between line action icons
Fix return module after creating related record
2021-03-30 19:21:39 +01:00
Clemente Raposo
f837f50f17 Add accounts types per month chart
- Add line chart rendering in charts component
- Rename chart to account_types_per_month
- Show all month number on x axis
- Group account data
- Add date parsing using luxon
-- Add luxon library
- Remove pipeline-chart to make chart centered
2021-03-30 19:21:39 +01:00
Clemente Raposo
4809bf5be9 Add leads by status list view charts
- Add pie-grid-chart component
- Add leads by status data source
- Adjust charts component
2021-03-30 19:21:38 +01:00
Dillon-Brown
a4797775de Implement chart module UI 2021-03-30 19:21:38 +01:00
Pedro Ernst
1c35bdd580 Feature #11505 List View Line Actions
Add line actions to listview to allow creating related records
2021-03-30 19:21:38 +01:00
Clemente Raposo
d8179f5324 Add listview menu action improvements
- Add actionLabelKeys to the navbar api
- Use actionLabelKeys in action-menu
- Filter out the List / View action in te action-menu
- Change module-navigation getActionLabel to support declaring the labelKey to use
- Fix unit test
2021-03-30 19:21:38 +01:00
Pedro Ernst
13cf4119dd Feature #10442 List Bulk Delete Action
Implement bulk delete handler and process
2021-03-30 19:21:38 +01:00
Garry Henderson
2eca6056da Display/hide listview columns by screen size 2021-03-30 19:21:38 +01:00
Clemente Raposo
cd7c611069 Set symfony profiler to track exceptions only
- Avoid having huge volume of cached data
2021-03-30 19:21:38 +01:00
Clemente Raposo
2a4e209614 Add Csv export bulk action
- Add CsvExportBulkAction process handler to provide the download information
- Extract legacy filter handling code to the LegacyFilterMapper.php service
- Add ExportBulkAction angular service to download the file using the info provided
2021-03-30 19:21:38 +01:00
Clemente Raposo
8881bc85f9 Add Merge bulk action
- Add base frontend bulk action handling
-- Add max min validations
-- Add generic backend bulk action process call
- Add front end redirect handler
-- Can be re-used by several bulk actions if needed
- Add MergeRecordsBulkAction.php backend handler
-- Handle the the bulk action process request
-- Tells front end if extra handling is needed

- Fix bug list view metadata sent to the front end
2021-03-30 19:21:38 +01:00
Dillon-Brown
2f5472f3c3 Add initial chart configuration for listview
- Create charts.yaml configuration.
- Add chart interface.
- Add chart service to fetch chart config.
2021-03-30 19:21:37 +01:00
Clemente Raposo
cc92e16141 Add configurable ListView BulkActions
- Add BulkActionDefinitionProvider
-- Add module.listview.bulk_action symfony parameter config
--- Add base config to bulk_actions.yaml
-- Add AclHandler legacy handler
- Add bulk actions list to the list view definitions api
- Retrieve bulk actions in metadata store
- Add bulkactions to list view store
- Display bulk actions list in bulk-action-menu.component
- Change dropdown-button to render dropdown items as <a> tags
- Add/update codeception unit tests
- Add/update karma/jasmine unit tests
2021-03-30 19:21:37 +01:00
Clemente Raposo
f2bd9d9949 Improve session checks and cookie reset
- Clean CSRF token when session has expired
-- On the root path
-- On the session-check entrypoint
--- Needed since this invalidates the session

- Add new session token after expiring old session
-- On the session-check entrypoint
--- Needed as the following login requests will require a token

- Configure CSRF token generation on the session-status api
-- The session status can invalidate the session
-- It also cleans the tokens
-- We need to generate a new token afterwards
2021-03-30 19:21:37 +01:00
Clemente Raposo
84bf643ce4 Add ListView filtering
- Add legacy filtering to ListView handler
- Map new filter format to legacy format
-- Add filter_operator_map.yaml to configure mappings
- Add criteria to field interface to support filter fields
- Add varchar filter mode component
-- Uses criteria instead of value for displaying and data binding
- Add search and clear buttons to list filter panel
-- Use internal criteria to keep current criteria status
--- Updated using filter field 2 way data binding
-- Update ListView store criteria on search or clear
- Update ListView store fetch method to use criteria
- ListView store: store criteria on local storage
-- Add current list criteria to local storage upon search
-- Load criteria when list view data is loaded
- Clear selection when filter is applied
- Update karma/jasmine tests
2021-03-30 19:21:37 +01:00
Clemente Raposo
a46a30e7c7 Add responsive navbar layout
- Add screensize observer to check size changes
- Add navbar item limit configuration per screen size
-- exposed through system configs
- Re-adjust navbar upon screen size changes
2021-03-30 19:21:37 +01:00
Clemente Raposo
ac0b0eb1b4 Add Cache Reset Actions
- Add configuration file for module actions that should reset cache
- Expose cache reset actions in the system config api
- Add route event listener to reset cache when navigating a way from defined cache reset actions
- Update unit tests
2021-03-30 19:21:36 +01:00
Clemente Raposo
b4d234cb43 Add ListView pagination
- Add custom getListView graphql resolver to be able to pass pagination input
-- Add api.list.get.ts to call new custom query/resolver

- Expose list_max_entries_per_page (page size) to front end

- Update pagination component
-- Display page count information
-- Update page on pagination button click
-- Add PaginationDataSource

- Update list view store
-- Update stored pagination information
-- Implement PaginationDataSource, to grab update changes callbacks
-- Retrieve list data on page change and update records state
--- which will update the list view contents

- Add / Update karma/jasmine tests
2021-03-30 19:21:36 +01:00
Clemente Raposo
b2dbb79cdd Add currency detail field component
- Add Component for detail mode
- Add currencyFormatPipe that extends currency pipe
- Register components in dynamic components manifest
- Expose currency user preference
-- Add mapper to retrieve the need currency info
- Expose currency system config
-- Add mapper to retrieve the needed currency info
- Add sample usage to list view
- Add karma/jasmine tests
- Add codeception unit tests
2021-03-30 19:21:36 +01:00
Clemente Raposo
21a831e9f3 Add date and time format config and preference mappers
- Update SystemConfigHander
-- Add ability to map config name
-- Add ability to map config value
-- Add SystemConfigMappers.php to store config mappers

- Update UserPreferenceHandler
-- Add ability to map preference name
-- Add ability to map preference value
-- Add UserPreferencesMappers to store preferences mappers

- Configure config mappers for date format
- Configure preference mappers for time format

- Update unit tests
2021-03-30 19:21:36 +01:00
Clemente Raposo
6db4a85634 Add int and float field detail implementation
- Add base field class
- Add base number class
- Add int field detail mode component
- Add float field detail mode component
-- Format using user preferences or system config
-- Add NumberFormatPipe to format using preferences
- Add fields to manifest
- Add sample to list view
- Add jasmine tests
2021-03-30 19:21:35 +01:00
Clemente Raposo
fb359cd5f6 Add ClassicView redirection exclusions
- Add configurable exclusions by module / action on the backend
-- Add ClassicViewRoutingExclusionsHandler to grab these from legacy
-- Expose these as system configs to the frontend
- Update redirect check to classic view
-- Do not re-direct when same route (example, for listview filtering)
-- Do not re-direct when route is excluded
-- Do not re-direct when not able to convert route
- Update unit tests
2021-03-30 19:21:35 +01:00
Clemente Raposo
f10cc2812f Display selected module on navbar
- Add current module and action to AppState
- Calculate current module and action in BaseModuleResolver
-- Add logic to show current module as active on
--- import and find duplicates
- Update legacy handler method to retrieve available modules
-- Also send invisible modules, to
--- Allow to display invisible modules as the selected module
-- Update module name mape
- Retrieve number of navbar items from backed

- Fix grouped tab links
- Simplify navbar abstract by simplifying parameters
-- passing language map instead of individual language
-- passing navigation object instead of individual parts
- Create smaller components for repeated parts of navbar
-- grouped-menu-item
-- menu-item
-- menu-item-link
-- menu-item-list
-- home-menu-item
-- home-menu-recently-viewed

- Removing "jsdoc/no-types" from eslint
-- To avoid conflicts with jsdoc/require-param-type
2021-03-30 19:21:35 +01:00
Dillon-Brown
3672c445e7 Create a UserChecker for pre/post authentication security
- Implement UserChecker to check user deletion status on pre/post auth.
- Modify LoginFormAuthenticator to use Symfony/Security to fetch user data.
- Add Security Exceptions: UserDeletedException, UserNotFoundException.
- Set the security firewall to run the UserChecker.
- Update User Entity with deleted getter.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:35 +01:00
Clemente Raposo
5d6aa45391 Add Route conversion on legacy
- Add legacy handler to access RouteConverter
- Add legacy handler to access ModuleNameMapper
- Add legacy handler to access ActionNameMapper
- Remove action and module name maps from Suite8 side

- Update frontend route converter to check for suite 8 routes
-- When link is a suite 8 route does not convert

- Add LegacyScopeState to allow for nested legacy handler calls
-- Add abstract getHandlerKey to base LegacyHandler
-- Implement getHandlerKey on all legacy handlers

- Update legacy handler init and close methods to use scope state
-- Check if withing an already open legacy handler scope
2021-03-30 19:21:34 +01:00
Clemente Raposo
6c3e266b5d Add legacy api re-direction
- Listen to legacy api calls on the LegacyRedirectListener
- Add LegacyApiRedirectHandler to re-direct to legacy endpoint
-- Using 307 re-direction response to support post re-direction
-- Using api_paths.yaml with the configuration with paths to check

- Setup API tests using codeception
-- Add helper methods to login in v4 and v8 API
- Add Api test to create account using v4 api
- Add Api test to create account using v8 api
- Add unit test for LegacyApiRedirectHandler
2021-03-30 19:21:34 +01:00
Clemente Raposo
2a489cbc7e Add fallback value to frontend action name mapper
- When not mapped, fallback to provided value
- Add ShowDuplicates to action_name_map
2021-03-30 19:21:34 +01:00
Clemente Raposo
e575f5d36d Update Action Name Map
- map about action
2021-03-30 19:21:34 +01:00
Clemente Raposo
e147faf3a1 Implement ClassicView
- Change Classic view component to use Iframe to render legacy view for specified url
- Add Iframe page change observer to detect page changes and route to appropriate view
-- Move legacy to suite8 route conversion to the front end
- Add Iframe resize observer to re-adjust the iframe size according to its contents
- Expose module and action name maps to the frontend within thee system configs
- Add unit and karma tests and ajdust existing ones
- Add floating to messages alert
- Make classic view resolver extend the base metadata resolver
- Move all front end calls to the default_module config to a single place
- Map default module name to frontend name in the legacy handler
2021-03-30 19:21:34 +01:00
Dillon-Brown
aa242f970c Implement user action menu
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00
Dillon-Brown
bc115670ba Add legacy user provider
- This changes the Symfony User entity to fetch the user from the legacy users table

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00
Clemente Raposo
25f7d38fcd Add legacy suite configuration support for grouped tabs
- Add ability to fully start legacy app on legacy handlers
- Update Navbar and UserPreferences handler to start the legacy app after init
- Update Navbar and UserPreferences handler to implement the corresponding interfaces
-- Update corresponding Data providers to use the new interfaces

- Change Navbar legacy handler to take into account the tab configured preferences
-- based on the implementation used in Legacy SugarView

- Update UserPreferences to use the currently logged in user
-- remove hard coded user
-- get UserPreferences from the legacy User object instead of grabbing it directly from the db

- Add All entry to grouped tabs

- Adjust unit tests
2021-03-30 19:21:34 +01:00
Dillon-Brown
9d484ed4a4 Linkup footer back to top with authentication
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00