Skip to content
Snippets Groups Projects
Verified Commit 80a75f6a authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett
Browse files

Review changes, improve editable helper spec and add hasUpdated computer to issue_show app

Fix builds by only merge when updated_at_by is presnse

Fix issue_show app.vue hasUpdated reference to state

Fix missing bracket
parent abac8122
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -71,6 +71,11 @@ export default {
titleComponent,
editedComponent,
},
computed: {
hasUpdated() {
return !!this.state.updatedAt;
},
},
created() {
const resource = new Service(this.endpoint);
const poll = new Poll({
Loading
Loading
@@ -112,7 +117,7 @@ export default {
:description-text="state.descriptionText"
:task-status="state.taskStatus" />
<edited-component
v-if="!!state.updatedAt"
v-if="hasUpdated"
:updated-at="state.updatedAt"
:updated-by-name="state.updatedByName"
:updated-by-path="state.updatedByPath"
Loading
Loading
Loading
Loading
@@ -51,10 +51,10 @@
 
.issue-details.issuable-details
.detail-page-description.content-block
#js-issuable-app{ "data" => { "endpoint" => realtime_changes_namespace_project_issue_path(@project.namespace, @project, @issue),
"can-update" => can?(current_user, :update_issue, @issue).to_s,
"issuable-ref" => @issue.to_reference,
}.merge(updated_at_by(@issue)) }
- issuable_app_data = { "endpoint" => realtime_changes_namespace_project_issue_path(@project.namespace, @project, @issue), "can-update" => can?(current_user, :update_issue, @issue).to_s, "issuable-ref" => @issue.to_reference }
- updated_at_by = updated_at_by(@issue)
- issuable_app_data.merge(updated_at_by) if updated_at_by.present?
#js-issuable-app{ data: issuable_app_data }
%h2.title= markdown_field(@issue, :title)
- if @issue.description.present?
.description{ class: can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '' }
Loading
Loading
Loading
Loading
@@ -15,8 +15,7 @@ describe EditableHelper do
}
end
 
it { expect(helper.updated_at_by(unedited_editable)).to eq(nil) }
it { expect(helper.updated_at_by(unedited_editable)).to be_nil }
it { expect(helper.updated_at_by(edited_editable)).to eq(edited_updated_at_by) }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment