Compare commits

...

2 Commits

Author SHA1 Message Date
Keanu D?lle f02c963e62 FIX: add new empty position in edit times in event billing 2022-03-16 12:38:41 +01:00
Keanu D?lle 587f14a8b7 FIX: fixed #25
Replaced MiniSearchBar with search2
2022-03-16 12:38:15 +01:00
4 changed files with 50 additions and 61 deletions

View File

@ -76,51 +76,7 @@
</div>
{{/each}}
<div class="new_position_instances">
<div class="card new_position_instance" style="margin-bottom: 5px;">
<div class="card-header">Neue Personalposition
<button class="iconbutton remove_new_position_instance_button" style="float: right;">
<svg color="red" fill="currentColor" height="20" width="20">
<use xlink:href="/img/bootstrap-icons.svg#trash"></use>
</svg>
</button>
<button class="iconbutton restore_new_position_instance_button hide" style="float: right;">
<svg fill="green" height="20" width="20">
<use xlink:href="/img/bootstrap-icons.svg#arrow-counterclockwise"></use>
</svg>
</button>
</div>
<div class="card-body">
<div class="form-group row new_position_instance_position">
<label class="col-form-label col-3">Position:</label>
<div class="input-group col-9">
{{search2 type="position" classname="search_new_position_instance_position"}}
</div>
</div>
<div class="form-group row eb_eu_instance_new_position_instance_taken_by"
data-instance-id="{{../instance_id}}">
<label class="col-form-label col-3">Besetzung:</label>
<div class="input-group col-9">
{{search2 type="member" classname="search_new_position_instance_member"}}
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-form-label-sm col-3">Von: </label>
<div class="input-group col-9">
<input class="form-control form-control-sm new_position_instance_real_start_time qsf"
type="datetime-local"
value="{{real_start_time}}">
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-form-label-sm col-3">Bis: </label>
<div class="input-group col-9">
<input class="form-control form-control-sm new_position_instance_real_end_time qsf"
type="datetime-local"
value="{{real_end_time}}">
</div>
</div>
</div>
</div>
{{> new_position_instance}}
</div>
</div>
</div>

View File

@ -0,0 +1,45 @@
<div class="card new_position_instance" style="margin-bottom: 5px;">
<div class="card-header">Neue Personalposition
<button class="iconbutton remove_new_position_instance_button" style="float: right;">
<svg color="red" fill="currentColor" height="20" width="20">
<use xlink:href="/img/bootstrap-icons.svg#trash"></use>
</svg>
</button>
<button class="iconbutton restore_new_position_instance_button hide" style="float: right;">
<svg fill="green" height="20" width="20">
<use xlink:href="/img/bootstrap-icons.svg#arrow-counterclockwise"></use>
</svg>
</button>
</div>
<div class="card-body">
<div class="form-group row new_position_instance_position">
<label class="col-form-label col-3">Position:</label>
<div class="input-group col-9">
{{search2 type="position" classname="search_new_position_instance_position"}}
</div>
</div>
<div class="form-group row eb_eu_instance_new_position_instance_taken_by"
data-instance-id="{{../instance_id}}">
<label class="col-form-label col-3">Besetzung:</label>
<div class="input-group col-9">
{{search2 type="member" classname="search_new_position_instance_member"}}
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-form-label-sm col-3">Von: </label>
<div class="input-group col-9">
<input class="form-control form-control-sm new_position_instance_real_start_time qsf"
type="datetime-local"
value="{{real_start_time}}">
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-form-label-sm col-3">Bis: </label>
<div class="input-group col-9">
<input class="form-control form-control-sm new_position_instance_real_end_time qsf"
type="datetime-local"
value="{{real_end_time}}">
</div>
</div>
</div>
</div>

View File

@ -39,10 +39,6 @@ EventEditModule = (function () {
if (templates.core_data_view && templates.search && templates.cast_view && templates.cast_instance && !jQuery.isEmptyObject(event)) {
Handlebars.registerPartial('search', templates.search);
$(".edit_event_core_data").append(templates.core_data_view(event));
var member_search = new MiniSearchbar("edit_event_search", null, event.member_responsible, event.member_responsible_name);
member_search.setup();
var organiser_search = new MiniSearchbar("edit_event_organiser_search", null, event.organiser_id, event.organiser_name);
organiser_search.setup();
$("#edit_event_btn").on("click", save_event);
$("#edit_event_delete_link").on("click", function(){
@ -54,9 +50,6 @@ EventEditModule = (function () {
$("#edit_event_cast_cast_tabpanel").append(templates.cast_view());
var template_search = new MiniSearchbar("edit_event_cast_template_search", null, null, null);
template_search.setup();
$("#edit_event_cast_instance_planned_start_time").val(event.start);
$("#edit_event_cast_instance_planned_end_time").val(event.end);
@ -124,12 +117,10 @@ EventEditModule = (function () {
}
event.related_group = $("#related_group option:selected").val();
if ($("#edit_event_search").data("entity-id")) {
event.member_responsible = $("#edit_event_search").data("entity-id");
}
if ($("#edit_event_organiser_search").data("entity-id")) {
event.organiser_id = $("#edit_event_organiser_search").data("entity-id");
}
event.member_responsible = $(".search_member_responsible").data("value-id") || undefined;
event.organiser_id = $(".search_organiser").data("value-id") || undefined;
if ($("#other").val().length > 0) {
event.other = $("#other").val();
}

View File

@ -40,9 +40,6 @@ pub fn edit_event(cookie: SessionCookie, _settings: &State<Settings>, id: String
};
let footer = Footer {
scripts: vec![
Script {
path: "/js/mini_searchbar.js".to_string(),
},
Script {
path: "/js/em_edit_event.js".to_string(),
},