Skip to content

Commit

Permalink
Merge pull request #2882 from Leantime/all-projects-fixes
Browse files Browse the repository at this point in the history
All project fixes
  • Loading branch information
marcelfolaron authored Jan 8, 2025
2 parents 8211206 + 3c3a4ec commit 9c27651
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 30 deletions.
4 changes: 3 additions & 1 deletion app/Domain/Projects/Js/projectsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ export const favoriteProject = function(id, element) {
}

// Make public what you want to have public, everything else is private
export default {
export const projectsController = {
initDates: initDates,
initProjectTabs: initProjectTabs,
initProgressBar: initProgressBar,
Expand All @@ -587,3 +587,5 @@ export default {
initProjectsKanban: initProjectsKanban,
favoriteProject: favoriteProject
};

export default projectsController;
63 changes: 42 additions & 21 deletions app/Domain/Projects/Templates/newProject.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
@php
use Leantime\Core\Support\EditorTypeEnum;
@endphp

@extends($layout)

@section('content')
<?php
$project = $tpl->get('project');
$project = $tpl->get('project');
$project = $tpl->get('project');
?>

Expand Down Expand Up @@ -52,10 +59,14 @@
<p>
{{ __('label.accomplish') }}
{{ __('label.describe_outcome') }}
</p>
<br /><br />
<br /><br />
</p>
<br /><br />
</p>

<x-global::forms.text-editor name="details" :type="EditorTypeEnum::Complex->value" :value="$canvasItem->data" />
{{-- <x-global::forms.text-editor name="details" :type="EditorTypeEnum::Complex->value" :value="$canvasItem->data" /> --}}
</div>
</div>
<div class="padding-top">
Expand Down Expand Up @@ -94,21 +105,28 @@ class="delete"><i class="fa fa-trash"></i> {{ __('buttons.delete') }}</a>
<div style="margin-bottom: 30px;">
<h4 class="widgettitle title-light block"><span
class="fa fa-calendar"></span>{{ __('label.project_dates') }}</h4>

<div>
<label>{{ __('label.project_start') }}</label>
<div class="">
<input type="text" class="dates dateFrom" style="width:100px;" name="start"
autocomplete="off" value="<?php echo $project['start']; ?>"
placeholder="<?= $tpl->__('language.dateformat') ?>" />

</div>
<label>{{ __('label.project_end') }}</label>
<div class="">
<input type="text" class="dates dateTo" style="width:100px;" name="end"
autocomplete="off" value="<?php echo $project['end']; ?>"
placeholder="<?= $tpl->__('language.dateformat') ?>" />

</div>
<x-global::forms.text-input
type="text"
name="start"
id="dateFrom"
class="dates dateFrom"
labelText="{!! __('label.project_start') !!}"
value="<?php echo $project['start']; ?>"
variant="compact"
placeholder="{!! __('language.dateformat') !!}"
/>
<x-global::forms.text-input
type="text"
name="end"
id="dateTo"
class="dates dateTo"
labelText="{!! __('label.project_end') !!}"
value="<?php echo $project['end']; ?>"
variant="compact"
placeholder="{!! __('language.dateformat') !!}"
/>
</div>

</div>
Expand All @@ -121,8 +139,8 @@ class="fa fa-building"></span>{{ __('label.client_product') }}</h4>

<x-global::forms.select name="clientId" id="clientId" >
@foreach ($tpl->get('clients') as $row)
<x-global::forms.select.select-option :value="$row['id']" :selected="$project['clientId'] == $row['id']">
{{ $tpl->escape($row['name']) }}
<x-global::forms.select.select-option :value="$row->id" :selected="$project['clientId'] == $row->id">
{{ $tpl->escape($row->name) }}
</x-global::forms.select.select-option>
@endforeach
</x-global::forms.select>
Expand Down Expand Up @@ -171,13 +189,16 @@ class="fa fa-lock-open"></span>{{ __('labels.defaultaccess') }}</h4>
</div>
</div>

<script type="text/javascript">
<script type="module">
import "@mix('/js/components/datePickers.module.js')"
import "@mix('js/Domain/Projects/Js/projectsController.js')"
jQuery(document).ready(function() {
jQuery("#projectdetails select").chosen();
leantime.dateController.initDateRangePicker(".dateFrom", ".dateTo", 2);
// jQuery("#projectdetails select").chosen();
datePickers.initDateRangePicker(".dateFrom", ".dateTo", 2);
leantime.projectsController.initProjectTabs();
projectsController.initProjectTabs();
});
</script>
Expand Down
21 changes: 13 additions & 8 deletions app/Domain/Projects/Templates/showAll.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@
/>
</form>
</div>

<a class="btn btn-primary" href="{{ BASE_URL }}/projects/newProject"><i class='fa fa-plus'></i> <?=$tpl->__('link.new_project') ?></a>

<x-global::forms.button tag="a" content-role="primary" href="{{ BASE_URL }}/projects/newProject">
<i class='fa fa-plus'></i> {{ __('link.new_project') }}
</x-global::forms.button>

<div class="clearall"></div>
<table class="table table-bordered" cellpadding="0" cellspacing="0" border="0" id="allProjectsTable">

Expand Down Expand Up @@ -71,20 +74,22 @@
<tr class='gradeA'>

<td style="padding:6px;">
<a class="" href="{{ BASE_URL }}/projects/showProject/<?=$row['id']?>"><?= $tpl->escape($row['name']) ?></a>
<a class="link link-hover" href="{{ BASE_URL }}/projects/showProject/{{ $row['id'] }}">{!! $row['name'] !!}</a>
</td>
<td>
<a class="" href="{{ BASE_URL }}/clients/showClient/<?=$row['clientId']?>"><?= $tpl->escape($row['clientName']) ?></a>
<a class="link link-hover" href="{{ BASE_URL }}/clients/showClient/{{ $row['clientId'] }}">{!! $row['clientName'] !!}</a>
</td>

<td> <?=$row['type'] ?> </td>
<td> {{ $row['type'] }} </td>

<td><?php if ($row['state'] == -1) {
echo $tpl->__('label.closed');
} else {
echo $tpl->__('label.open');
} ?></td>
<td class="center"><?php $tpl->e($row['hourBudget']); ?></td>
<td class="center"><?php $tpl->e($row['dollarBudget']); ?></td>
} ?>
</td>
<td class="center">{{ $row['hourBudget'] }}</td>
<td class="center">{{ $row['dollarBudget'] }}</td>
</tr>
<?php endforeach; ?>

Expand Down

0 comments on commit 9c27651

Please sign in to comment.