diff --git a/app/assets/stylesheets/shared/ag_table.scss b/app/assets/stylesheets/shared/ag_table.scss index 9282f8783..c4cf3c1a0 100644 --- a/app/assets/stylesheets/shared/ag_table.scss +++ b/app/assets/stylesheets/shared/ag_table.scss @@ -15,7 +15,6 @@ --ag-icon-font-code-checkbox-indeterminate: asset-url("checkbox/indeterminate.svg"); --ag-input-focus-box-shadow: none; --ag-cell-horizontal-padding: .75rem; - border: 0; .ag-cell { @@ -31,6 +30,10 @@ cursor: pointer; } + .ag-header-cell-resize { + width: 1rem; + } + .ag-input-field-input:focus { outline: none !important; outline-offset: 0 !important; diff --git a/app/controllers/experiments_controller.rb b/app/controllers/experiments_controller.rb index 6c94aa622..9a2630d47 100644 --- a/app/controllers/experiments_controller.rb +++ b/app/controllers/experiments_controller.rb @@ -74,6 +74,8 @@ class ExperimentsController < ApplicationController .select('COUNT(DISTINCT comments.id) as task_comments_count') .select('my_modules.*').group(:id) end + + save_view_type('canvas') end def my_modules @@ -456,6 +458,12 @@ class ExperimentsController < ApplicationController params.require(:experiment).require(:view_type) end + def save_view_type(view_type) + view_state = @experiment.current_view_state(current_user) + view_state.state['my_modules']['view_type'] = view_type + view_state.save! + end + def check_read_permissions current_team_switch(@experiment.project.team) if current_team != @experiment.project.team render_403 unless can_read_experiment?(@experiment) || diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb index 2dab50511..771cbfabd 100644 --- a/app/controllers/my_modules_controller.rb +++ b/app/controllers/my_modules_controller.rb @@ -38,6 +38,7 @@ class MyModulesController < ApplicationController meta: pagination_dict(my_modules) end format.html do + save_view_type('table') render 'my_modules/index' end end @@ -573,6 +574,12 @@ class MyModulesController < ApplicationController end end + def save_view_type(view_type) + view_state = @experiment.current_view_state(current_user) + view_state.state['my_modules']['view_type'] = view_type + view_state.save! + end + def log_activity(type_of, my_module = nil, message_items = {}) my_module ||= @my_module message_items = { my_module: my_module.id }.merge(message_items) diff --git a/app/javascript/vue/experiments/list.vue b/app/javascript/vue/experiments/list.vue index 2a12a44a8..e90658f57 100644 --- a/app/javascript/vue/experiments/list.vue +++ b/app/javascript/vue/experiments/list.vue @@ -122,7 +122,8 @@ export default { { field: 'created_at', headerName: this.i18n.t('experiments.card.start_date'), - sortable: true + sortable: true, + minWidth: 130 }, { field: 'updated_at', diff --git a/app/javascript/vue/projects/list.vue b/app/javascript/vue/projects/list.vue index c6f984321..94d21eaeb 100644 --- a/app/javascript/vue/projects/list.vue +++ b/app/javascript/vue/projects/list.vue @@ -88,7 +88,7 @@ export default { NewProjectModal, NewFolderModal, MoveModal, - AccessModal, + AccessModal }, props: { dataSource: { type: String, required: true }, @@ -102,7 +102,7 @@ export default { userRolesUrl: { type: String }, currentFolderId: { type: String }, foldersTreeUrl: { type: String }, - moveToUrl: { type: String }, + moveToUrl: { type: String } }, data() { return { @@ -158,7 +158,7 @@ export default { viewRenders() { return [ { type: 'table' }, - { type: 'cards' }, + { type: 'cards' } ]; }, toolbarActions() { @@ -170,7 +170,7 @@ export default { label: this.i18n.t('projects.index.new'), type: 'emit', path: this.createUrl, - buttonStyle: 'btn btn-primary', + buttonStyle: 'btn btn-primary' }); } if (this.createFolderUrl) { @@ -180,32 +180,32 @@ export default { label: this.i18n.t('projects.index.new_folder'), type: 'emit', path: this.createFolderUrl, - buttonStyle: 'btn btn-light', + buttonStyle: 'btn btn-light' }); } return { left, - right: [], + right: [] }; }, filters() { const filters = [ { key: 'query', - type: 'Text', + type: 'Text' }, { key: 'created_at', type: 'DateRange', - label: this.i18n.t('filters_modal.created_on.label'), - }, + label: this.i18n.t('filters_modal.created_on.label') + } ]; if (this.currentViewMode === 'archived') { filters.push({ key: 'archived_at', type: 'DateRange', - label: this.i18n.t('filters_modal.archived_on.label'), + label: this.i18n.t('filters_modal.archived_on.label') }); } @@ -216,13 +216,13 @@ export default { optionRenderer: this.usersFilterRenderer, labelRenderer: this.usersFilterRenderer, label: this.i18n.t('projects.index.filters_modal.members.label'), - placeholder: this.i18n.t('projects.index.filters_modal.members.placeholder'), + placeholder: this.i18n.t('projects.index.filters_modal.members.placeholder') }); filters.push({ key: 'folder_search', type: 'Checkbox', - label: this.i18n.t('projects.index.filters_modal.folders.label'), + label: this.i18n.t('projects.index.filters_modal.folders.label') }); return filters; @@ -251,7 +251,7 @@ export default { access(event, rows) { this.accessModalParams = { object: rows[0], - roles_path: this.userRolesUrl, + roles_path: this.userRolesUrl }; }, async archive(event, rows) { @@ -312,7 +312,7 @@ export default { if (ok) { axios.post(event.path, { project_ids: rows.filter((row) => !row.folder).map((row) => row.id), - project_folder_ids: rows.filter((row) => row.folder).map((row) => row.id), + project_folder_ids: rows.filter((row) => row.folder).map((row) => row.id) }).then((response) => { this.reloadingTable = true; HelperModule.flashAlertMsg(response.data.message, 'success'); diff --git a/app/javascript/vue/shared/datatable/action_toolbar.vue b/app/javascript/vue/shared/datatable/action_toolbar.vue index e0a428815..3d44e8bd0 100644 --- a/app/javascript/vue/shared/datatable/action_toolbar.vue +++ b/app/javascript/vue/shared/datatable/action_toolbar.vue @@ -8,7 +8,7 @@ {{ i18n.t('action_toolbar.no_actions') }}
-
diff --git a/app/javascript/vue/shared/datatable/toolbar.vue b/app/javascript/vue/shared/datatable/toolbar.vue index 5be899798..6d8acc814 100644 --- a/app/javascript/vue/shared/datatable/toolbar.vue +++ b/app/javascript/vue/shared/datatable/toolbar.vue @@ -75,7 +75,7 @@ :title="i18n.t('experiments.table.column_display_modal.title')" class="btn btn-light icon-btn btn-black" > - +