mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-19 16:01:34 +02:00
Added new project fields
This commit is contained in:
parent
b35229f083
commit
28fff1a132
@ -25,6 +25,9 @@ class Project extends EntityModel
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'task_rate',
|
||||
'private_notes',
|
||||
'due_date',
|
||||
'budgeted_hours',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -5,6 +5,7 @@ namespace App\Ninja\Repositories;
|
||||
use App\Models\Project;
|
||||
use Auth;
|
||||
use DB;
|
||||
use Utils;
|
||||
|
||||
class ProjectRepository extends BaseRepository
|
||||
{
|
||||
@ -71,6 +72,11 @@ class ProjectRepository extends BaseRepository
|
||||
}
|
||||
|
||||
$project->fill($input);
|
||||
|
||||
if (isset($input['due_date'])) {
|
||||
$project->due_date = Utils::toSqlDate($input['due_date']);
|
||||
}
|
||||
|
||||
$project->save();
|
||||
|
||||
return $project;
|
||||
|
@ -55,6 +55,12 @@ class AddRemember2faToken extends Migration
|
||||
Schema::table('invoice_items', function ($table) {
|
||||
$table->float('discount');
|
||||
});
|
||||
|
||||
Schema::table('projects', function ($table) {
|
||||
$table->date('due_date')->nullable();
|
||||
$table->text('private_notes')->nullable();
|
||||
$table->float('budgeted_hours');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -90,5 +96,11 @@ class AddRemember2faToken extends Migration
|
||||
Schema::table('invoice_items', function ($table) {
|
||||
$table->dropColumn('discount');
|
||||
});
|
||||
|
||||
Schema::table('projects', function ($table) {
|
||||
$table->dropColumn('due_date');
|
||||
$table->dropColumn('private_notes');
|
||||
$table->dropColumn('budgeted_hours');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -2623,6 +2623,7 @@ $LANG = array(
|
||||
'convert_products' => 'Convert Products',
|
||||
'convert_products_help' => 'Automatically convert product prices to the client\'s currency',
|
||||
'improve_client_portal_link' => 'Set a subdomain to shorten the client portal link.',
|
||||
'budgeted_hours' => 'Budgeted Hours',
|
||||
|
||||
);
|
||||
|
||||
|
@ -38,10 +38,19 @@
|
||||
|
||||
{!! Former::text('name') !!}
|
||||
|
||||
{!! Former::text('due_date')
|
||||
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))
|
||||
->addGroupClass('due_date')
|
||||
->append('<i class="glyphicon glyphicon-calendar"></i>') !!}
|
||||
|
||||
{!! Former::text('budgeted_hours')->type('number') !!}
|
||||
|
||||
{!! Former::text('task_rate')
|
||||
->placeholder($project && $project->client->task_rate ? $project->client->present()->taskRate : $account->present()->taskRate)
|
||||
->help('task_rate_help') !!}
|
||||
|
||||
{!! Former::textarea('private_notes')->rows(4) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -120,6 +129,8 @@
|
||||
$('#task_rate').attr('placeholder', roundSignificant(rate, true));
|
||||
});
|
||||
|
||||
$('#due_date').datepicker('update', '{{ $project ? Utils::fromSqlDate($project->due_date) : '' }}');
|
||||
|
||||
@if ($clientPublicId)
|
||||
$('#name').focus();
|
||||
@else
|
||||
|
Loading…
Reference in New Issue
Block a user