mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
e2e - added new tags - general-inventories-activities [SCI-10016] (#6947)
This commit is contained in:
parent
f57a2d550a
commit
967950468d
13 changed files with 36 additions and 29 deletions
|
@ -47,7 +47,7 @@
|
||||||
:data-object-type="action.actions[0].item_type"
|
:data-object-type="action.actions[0].item_type"
|
||||||
:data-object-id="action.actions[0].item_id"
|
:data-object-id="action.actions[0].item_id"
|
||||||
:data-action="action.actions[0].type"
|
:data-action="action.actions[0].type"
|
||||||
:data-e2e="`e2e-BT-actionToolbar-${action.name.replace('export_group', 'export')}`"
|
:data-e2e="`e2e-BT-actionToolbar-${action.name === 'export_group' ? 'export' : action.name}`"
|
||||||
@click="doAction(action.actions[0], $event);">
|
@click="doAction(action.actions[0], $event);">
|
||||||
<i :class="action.actions[0].icon"></i>
|
<i :class="action.actions[0].icon"></i>
|
||||||
<span class="sn-action-toolbar__button-text">{{ action.group_label }}</span>
|
<span class="sn-action-toolbar__button-text">{{ action.group_label }}</span>
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
:data-object-type="action.item_type"
|
:data-object-type="action.item_type"
|
||||||
:data-object-id="action.item_id"
|
:data-object-id="action.item_id"
|
||||||
:data-action="action.type"
|
:data-action="action.type"
|
||||||
:data-e2e="`e2e-BT-actionToolbar-${action.name}`"
|
:data-e2e="`e2e-BT-actionToolbar-${action.name === 'export_group' ? 'export' : action.name}`"
|
||||||
@click="doAction(action, $event)">
|
@click="doAction(action, $event)">
|
||||||
<i :class="action.icon"></i>
|
<i :class="action.icon"></i>
|
||||||
<span class="sn-action-toolbar__button-text">{{ action.label }}</span>
|
<span class="sn-action-toolbar__button-text">{{ action.label }}</span>
|
||||||
|
|
|
@ -22,9 +22,11 @@
|
||||||
:btnClasses="'btn btn-light icon-btn btn-black'"
|
:btnClasses="'btn btn-light icon-btn btn-black'"
|
||||||
:position="'right'"
|
:position="'right'"
|
||||||
:btnIcon="'sn-icon sn-icon-settings'"
|
:btnIcon="'sn-icon sn-icon-settings'"
|
||||||
|
:data-e2e="'e2e-DD-topMenu-settings'"
|
||||||
></MenuDropdown>
|
></MenuDropdown>
|
||||||
<div v-if="user" class="sci--navigation--notificaitons-flyout-container" >
|
<div v-if="user" class="sci--navigation--notificaitons-flyout-container">
|
||||||
<button class="btn btn-light icon-btn btn-black"
|
<button class="btn btn-light icon-btn btn-black"
|
||||||
|
:data-e2e="'e2e-DD-topMenu-notifications'"
|
||||||
:title="i18n.t('nav.notifications.title')"
|
:title="i18n.t('nav.notifications.title')"
|
||||||
:class="{ 'has-unseen': unseenNotificationsCount > 0 }"
|
:class="{ 'has-unseen': unseenNotificationsCount > 0 }"
|
||||||
:data-unseen="unseenNotificationsCount"
|
:data-unseen="unseenNotificationsCount"
|
||||||
|
@ -41,7 +43,7 @@
|
||||||
@close="notificationsOpened = false" />
|
@close="notificationsOpened = false" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="user" class="dropdown" :title="i18n.t('nav.user_profile')">
|
<div v-if="user" class="dropdown" :title="i18n.t('nav.user_profile')">
|
||||||
<div class="sci--navigation--top-menu-user btn btn-light icon-btn btn-black" data-toggle="dropdown">
|
<div class="sci--navigation--top-menu-user btn btn-light icon-btn btn-black" data-toggle="dropdown" data-e2e="e2e-DD-topMenu-avatar">
|
||||||
<img class="avatar w-6 h-6" :src="user.avatar_url">
|
<img class="avatar w-6 h-6" :src="user.avatar_url">
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown-menu dropdown-menu-right rounded !p-2.5 sn-shadow-menu-sm">
|
<div class="dropdown-menu dropdown-menu-right rounded !p-2.5 sn-shadow-menu-sm">
|
||||||
|
|
|
@ -4,11 +4,12 @@
|
||||||
id="exportStockConsumptionModal"
|
id="exportStockConsumptionModal"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-labelledby="modal-export-stock-consumption-label">
|
aria-labelledby="modal-export-stock-consumption-label"
|
||||||
|
data-e2e="e2e-MD-invInventoryExportConsumptionAT">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" :aria-label="i18n.t('general.close')">
|
<button type="button" class="close" data-dismiss="modal" :aria-label="i18n.t('general.close')" data-e2e="e2e-BT-exportMD-close">
|
||||||
<i class="sn-icon sn-icon-close"></i>
|
<i class="sn-icon sn-icon-close"></i>
|
||||||
</button>
|
</button>
|
||||||
<h4 class="modal-title"> {{ i18n.t('zip_export.consumption_modal_label') }} </h4>
|
<h4 class="modal-title"> {{ i18n.t('zip_export.consumption_modal_label') }} </h4>
|
||||||
|
@ -19,11 +20,11 @@
|
||||||
<p class='pb-0' v-html="i18n.t('zip_export.consumption_footer_html')"></p>
|
<p class='pb-0' v-html="i18n.t('zip_export.consumption_footer_html')"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type='button' class='btn btn-secondary' data-dismiss='modal' id='close-modal-export-stock-consumption'>
|
<button type='button' class='btn btn-secondary' data-dismiss='modal' id='close-modal-export-stock-consumption' data-e2e='e2e-BT-exportMD-cancel'>
|
||||||
{{ i18n.t('general.cancel') }}
|
{{ i18n.t('general.cancel') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button class="btn btn-success" id="export-stock-consumption" @click="exportConsumption">
|
<button class="btn btn-success" id="export-stock-consumption" @click="exportConsumption" data-e2e='e2e-BT-exportMD-export'>
|
||||||
{{ i18n.t('zip_export.consumption_generate') }}
|
{{ i18n.t('zip_export.consumption_generate') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
:data-id="attachment.id"
|
:data-id="attachment.id"
|
||||||
:data-gallery-view-id="parentId"
|
:data-gallery-view-id="parentId"
|
||||||
:data-preview-url="attachment.attributes.urls.preview"
|
:data-preview-url="attachment.attributes.urls.preview"
|
||||||
|
:data-e2e="`e2e-BT-attachment-${attachment.id}`"
|
||||||
>
|
>
|
||||||
<div class="attachment-preview" :class= "attachment.attributes.asset_type">
|
<div class="attachment-preview" :class= "attachment.attributes.asset_type">
|
||||||
<img v-if="attachment.attributes.medium_preview !== null"
|
<img v-if="attachment.attributes.medium_preview !== null"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="activity-card">
|
<div class="activity-card" data-e2e="e2e-CO-activities-activityCard">
|
||||||
<div class="activity-text">
|
<div class="activity-text" data-e2e="e2e-CO-activities-activityText">
|
||||||
<% if activity.old_activity? %>
|
<% if activity.old_activity? %>
|
||||||
<%= sanitize_input(activity.message) %>
|
<%= sanitize_input(activity.message) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= generate_activity_content(activity) %>
|
<%= generate_activity_content(activity) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="activity-info">
|
<div class="activity-info" data-e2e="e2e-CO-activities-activityInfo">
|
||||||
<div class="activity-timestamp">
|
<div class="activity-timestamp">
|
||||||
<%= activity.created_at.strftime('%H:%M') %>
|
<%= activity.created_at.strftime('%H:%M') %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,18 +6,20 @@
|
||||||
id="activities-group-<%= date %>-button"
|
id="activities-group-<%= date %>-button"
|
||||||
data-toggle="collapse"
|
data-toggle="collapse"
|
||||||
data-turbolinks="false"
|
data-turbolinks="false"
|
||||||
data-target="#activities-group-<%= date %>">
|
data-target="#activities-group-<%= date %>"
|
||||||
|
data-e2e="e2e-TL-activities-date-<%= date %>">
|
||||||
<span class="sn-icon sn-icon-right"></span>
|
<span class="sn-icon sn-icon-right"></span>
|
||||||
<%= l(Time.parse(date), format: :full_date) %>
|
<%= l(Time.parse(date), format: :full_date) %>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="date-activities">
|
<div class="date-activities">
|
||||||
<div class="activities-counter-label">
|
<div class="activities-counter-label">
|
||||||
<strong><%= activities.length %></strong>
|
<strong data-e2e="e2e-TX-activities-counter-<%= date %>"><%= activities.length %></strong>
|
||||||
<%= t("activities.index.#{'activity'.pluralize(activities.length)}_counter_label") %>
|
<%= t("activities.index.#{'activity'.pluralize(activities.length)}_counter_label") %>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse in activities-group"
|
<div class="collapse in activities-group"
|
||||||
id="activities-group-<%= date %>"
|
id="activities-group-<%= date %>"
|
||||||
|
data-e2e="e2e-CO-activities-group-<%= date %>"
|
||||||
data-button-link="<%= "#activities-group-#{date}-button" %>">
|
data-button-link="<%= "#activities-group-#{date}-button" %>">
|
||||||
<% activities.each do |activity| %>
|
<% activities.each do |activity| %>
|
||||||
<%= render partial: 'global_activities/activity', locals: { activity: activity } %>
|
<%= render partial: 'global_activities/activity', locals: { activity: activity } %>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% provide :head_title, t('nav.label.activities') %>
|
<% provide :head_title, t('nav.label.activities') %>
|
||||||
|
|
||||||
<div class="global-activities-container">
|
<div class="global-activities-container" data-e2e="e2e-CO-activities">
|
||||||
<div id="filters" data-filters='<%= @filters.to_json %>' ></div>
|
<div id="filters" data-filters='<%= @filters.to_json %>' ></div>
|
||||||
<div class="ga-top">
|
<div class="ga-top">
|
||||||
<%= render partial: "top_pane" %>
|
<%= render partial: "top_pane" %>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<%= render partial: 'shared/sidebar/projects', locals: { team: current_team, sort: nil, view_mode: projects_view_mode } if current_team %>
|
<%= render partial: 'shared/sidebar/projects', locals: { team: current_team, sort: nil, view_mode: projects_view_mode } if current_team %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="projectsWrapper" class="content-pane flexible projects-index <%= projects_view_mode %>" data-view-mode="<%= projects_view_mode %>" data-e2e="e2e-projects-container">
|
<div id="projectsWrapper" class="content-pane flexible projects-index <%= projects_view_mode %>" data-view-mode="<%= projects_view_mode %>" data-e2e="e2e-CO-projects">
|
||||||
<%= render partial: 'projects/index/header', locals: { current_folder: current_folder} %>
|
<%= render partial: 'projects/index/header', locals: { current_folder: current_folder} %>
|
||||||
|
|
||||||
<span style="display: none;" data-hook="projects-index-html"></span>
|
<span style="display: none;" data-hook="projects-index-html"></span>
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<%= form_with model: @tmp_repository,
|
<%= form_with model: @tmp_repository,
|
||||||
url: team_repository_copy_path(id: @repository, format: :json),
|
url: team_repository_copy_path(id: @repository, format: :json),
|
||||||
data: { remote: true } do |f| %>
|
data: { remote: true } do |f| %>
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document" data-e2e="e2e-MD-invDuplicateAT">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-e2e="e2e-BT-invDuplicateMD-close">
|
||||||
<i class="sn-icon sn-icon-close"></i>
|
<i class="sn-icon sn-icon-close"></i>
|
||||||
</button>
|
</button>
|
||||||
<h3 class="modal-title"><%= t("repositories.index.modal_copy.title_html", name: @repository.name ) %></h3>
|
<h3 class="modal-title"><%= t("repositories.index.modal_copy.title_html", name: @repository.name ) %></h3>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<%= f.submit t("repositories.index.modal_copy.copy"), class: "btn btn-success" %>
|
<%= f.submit t("repositories.index.modal_copy.copy"), class: "btn btn-success", data: { e2e: "e2e-BT-invDuplicateMD-copy" } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close"></i></button>
|
<button type="button" data-e2e="e2e-BT-exportMD-close" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close"></i></button>
|
||||||
<h4 class="modal-title"><%= t('repositories.index.modal_export.title') %></h4>
|
<h4 class="modal-title"><%= t('repositories.index.modal_export.title') %></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
@ -23,11 +23,12 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="export-repositories-modal-cancel" type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
<button id="export-repositories-modal-cancel" data-e2e="e2e-BT-exportMD-cancel" type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||||
<button id="export-repositories-modal-submit"
|
<button id="export-repositories-modal-submit"
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
data-export-url="<%= export_repositories_team_path(current_team) %>">
|
data-export-url="<%= export_repositories_team_path(current_team) %>"
|
||||||
|
data-e2e="e2e-BT-exportMD-export">
|
||||||
<%=t "repositories.index.modal_export.export" %>
|
<%=t "repositories.index.modal_export.export" %>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
<%= form_with(url: export_repository_team_path(repository),
|
<%= form_with(url: export_repository_team_path(repository),
|
||||||
html: { id: 'form-repository-rows-export' },
|
html: { id: 'form-repository-rows-export' },
|
||||||
data: { remote: true }) do |f| %>
|
data: { remote: true }) do |f| %>
|
||||||
<div class="modal-dialog" role="document" data-e2e="e2e-MD-invInventoryExportAT">
|
<div class="modal-dialog" role="document" data-e2e="e2e-MD-invInventoryExportItemsAT">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" data-e2e="e2e-BT-invInventoryExportMD-close" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close"></i></button>
|
<button type="button" data-e2e="e2e-BT-exportMD-close" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close"></i></button>
|
||||||
<h4 class="modal-title"><%=t 'zip_export.repositories_modal_label' %></h4>
|
<h4 class="modal-title"><%=t 'zip_export.repositories_modal_label' %></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
<div><%=t 'zip_export.repository_footer_html' %></div>
|
<div><%=t 'zip_export.repository_footer_html' %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type='button' data-e2e='e2e-BT-invInventoryExportMD-cancel' class='btn btn-secondary' data-dismiss='modal' id='close-modal-export-repository-rows'><%= t('general.cancel')%></button>
|
<button type='button' data-e2e='e2e-BT-exportMD-cancel' class='btn btn-secondary' data-dismiss='modal' id='close-modal-export-repository-rows'><%= t('general.cancel')%></button>
|
||||||
<%= f.submit t('my_modules.repository.export'), id: "export-repository-rows", class: "btn btn-success" %>
|
<%= f.submit t('my_modules.repository.export'), id: "export-repository-rows", class: "btn btn-success", data: {e2e: 'e2e-BT-exportMD-export'} %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<%= form_with model: @repository,
|
<%= form_with model: @repository,
|
||||||
url: team_repository_path(id: @repository, format: :json),
|
url: team_repository_path(id: @repository, format: :json),
|
||||||
data: { remote: true } do |f| %>
|
data: { remote: true } do |f| %>
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document" data-e2e="e2e-MD-invRenameAT">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-e2e="e2e-BT-invRenameMD-close">
|
||||||
<i class="sn-icon sn-icon-close"></i>
|
<i class="sn-icon sn-icon-close"></i>
|
||||||
</button>
|
</button>
|
||||||
<h3 class="modal-title"><%= t("repositories.index.modal_rename.title_html", name: @repository.name ) %></h3>
|
<h3 class="modal-title"><%= t("repositories.index.modal_rename.title_html", name: @repository.name ) %></h3>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<%= f.submit t("repositories.index.modal_rename.rename"), class: "btn btn-success" %>
|
<%= f.submit t("repositories.index.modal_rename.rename"), class: "btn btn-success", data: { e2e: "e2e-BT-invRenameMD-save" } %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
<h1 data-view-mode="archived"><span><%= t('labels.archived')%></span> <%= t('libraries.index.head_title_archived') %></h1>
|
<h1 data-view-mode="archived"><span><%= t('labels.archived')%></span> <%= t('libraries.index.head_title_archived') %></h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-body" data-e2e="e2e-inventories-container">
|
<div class="content-body" data-e2e="e2e-CO-inventories">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue