我正在开发一个 Angular 6 项目,我想使用 Chart.js 创建一些图表。
我使用 npm install Chart.js 安装了 Chart.js,其版本类似于 3.5.1。
我的 TypeScript 版本是 2.9.0。
所以当我尝试ng serve:
node_modules/chart.js/types/animation.d.ts(20,37): error TS1005: ',' expected.
node_modules/chart.js/types/animation.d.ts(20,46): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(39,56): error TS1005: ';' expected.
node_modules/chart.js/types/index.esm.d.ts(39,58): error TS1011: An element access expression should take an argument.
node_modules/chart.js/types/index.esm.d.ts(39,85): error TS1005: '(' expected.
node_modules/chart.js/types/index.esm.d.ts(535,38): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(535,56): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(2424,37): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(2424,50): error TS1005: ',' expected.
node_modules/chart.js/types/index.esm.d.ts(2734,63): error TS1005: ';' expected.
node_modules/chart.js/types/index.esm.d.ts(2734,69): error TS1011: …Run Code Online (Sandbox Code Playgroud) 我正在开发一个考勤管理系统。因此我的主管要求我开发以下视图来获取考勤时间和日期值。
所有记录都需要根据受训者 ID 保存在数据库中。根据该视图,如果具有上述 ID 的人选中该框,然后按标记按钮,则时间值和受训者 ID 必须按时间保存在数据库中。
那么如果一旦标记了Date值也需要保存在数据库中。
谁能建议我相关的控制器功能?
这是上面的相关视图
<table class="table table-striped">
<thead>
<th>Trainee ID</th>
<th>Name with Initials</th>
<th>Time</th>
<th>Mark Here!</th>
</thead>
<tbody>
@foreach($items as $item)
<tr>
<td>{{ $item->trainee_id }}</td>
<td>{{ $item->name_with_initials }}</td>
<td>
<label><input type="checkbox" value=""> Time</label>
</td>
<td>
<a class="btn btn-info" href="Bankdetails/{{ $item->trainee_id }}">Mark Here</a>
</td>
</tr>
@endforeach
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud) 我开发了获取当前日期和时间值的函数。它工作正常。但时间值错误。现在时间是我的时间下午 12.32,但它在数据库中保存为上午 6.40。
这是使用的控制器功能。
public function store(Request $request)
{
$request['time']=date("Y-m-d h:i:s a", time());
attendance::create($request->all());
return view('traineeattendance.attendanceo');
}
Run Code Online (Sandbox Code Playgroud)
斯里兰卡标准时间 (SLST) 是斯里兰卡的时区。比 GMT/UTC (UTC+05:30) 早 5 小时 30 分钟,因此时区 = GMT+5.5。
谁能帮我解决这个问题?