-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/49951 meetings tab on work package page (#13749)
* [#49951] Meetings tab on work package page https://community.openproject.org/work_packages/49951 * added meetings tab for work package page as and add-on feature for #13725, specs missing * cleanup and updated to-do comments * cleanup left-overs of include child wps draft * Use autocomplete select decoration for meeting selector * Use proper prefix for turbo frame src and add content-loader example * WIP: Adding specs for meetings tab, specs for adding agenda items through meetings tab missing * re-enabled temporarly disabled specs * cleanup redundant UI update * implemented potentiallly reuseable async primer dialog, using turbo frame and a bit of stimulus * cleanup * finalized meeting tabs specs * adjusted contracts towards usage in meetings tab * Do not output meetings tab on new work packages * Don't use through association to check for presence, use meeting itself * Add TurboElement type to prevent any * Rework into view * Visit response in case frame is missing If you're setting up the wrong frame response, you get "Content missing" by default. This is not very helpful for identifying the error. We can listen to the turbo frame-missing event and promote it to a full visit instead https://community.openproject.org/work_packages/50210 * Add nowrap to "Added by" * Unify "added by" display * Adapt create contract spec for visibility check * Use contract to get assignable meetings * Use explicit option to set decorated status, even if options empty --------- Co-authored-by: Oliver Günther <[email protected]>
- Loading branch information
1 parent
99fdd10
commit 1a9d031
Showing
36 changed files
with
1,642 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
frontend/src/stimulus/controllers/dynamic/op-turbo-op-primer-async-dialog.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* -- copyright | ||
* OpenProject is an open source project management software. | ||
* Copyright (C) 2023 the OpenProject GmbH | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License version 3. | ||
* | ||
* OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: | ||
* Copyright (C) 2006-2013 Jean-Philippe Lang | ||
* Copyright (C) 2010-2013 the ChiliProject Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* See COPYRIGHT and LICENSE files for more details. | ||
* ++ | ||
*/ | ||
|
||
import { Controller } from '@hotwired/stimulus'; | ||
import { TurboElement } from '../../../typings/turbo'; | ||
|
||
export default class extends Controller { | ||
static targets = ['frameElement']; | ||
declare readonly frameElementTarget:HTMLInputElement&TurboElement; | ||
|
||
private initialState:string; | ||
|
||
connect():void { | ||
this.initialState = this.frameElementTarget.innerHTML; | ||
} | ||
|
||
reinitFrame():void { | ||
this.frameElementTarget.innerHTML = this.initialState; | ||
this.frameElementTarget.reload(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface TurboElement { | ||
reload:() => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
<%= render(FormControl.new(input: @input)) do %> | ||
<%= angular_component_tag 'opce-autocompleter', | ||
data: @autocomplete_options.delete(:data) { {} }, | ||
inputs: @autocomplete_options.merge({ | ||
classes: "ng-select--primerized #{@input.invalid? ? '-error' : ''}", | ||
inputName: builder.field_name(@input.name), | ||
inputValue: builder.object.send(@input.name), | ||
defaultData: 'true' | ||
}) | ||
%> | ||
<% if decorated_select? %> | ||
<%= render partial: '/augmented/autocomplete_select_decoration', | ||
locals: { | ||
input_name: builder.field_name(@input.name), | ||
input_id: builder.field_id(@input.name), | ||
select_options: select_options.map(&:to_h), | ||
multiple: @autocomplete_options.fetch(:multiple, false), | ||
key: @autocomplete_options.fetch(:resource, '') | ||
} %> | ||
<% else %> | ||
<%= angular_component_tag 'opce-autocompleter', | ||
data: @autocomplete_options.delete(:data) { {} }, | ||
inputs: @autocomplete_options.merge( | ||
classes: "ng-select--primerized #{@input.invalid? ? '-error' : ''}", | ||
inputName: builder.field_name(@input.name), | ||
inputValue: builder.object.send(@input.name), | ||
defaultData: 'true' | ||
) | ||
%> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.