Commit 04728ca8 by martinus

fix code

parent a05c15d2
No related merge requests found
<?php
namespace App\Charts;
use ConsoleTVs\Charts\Classes\Chartjs\Chart;
class PostagChart extends Chart
{
/**
* Initializes the chart.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
}
......@@ -3,16 +3,85 @@
namespace App\Http\Controllers;
use App\User;
use App\Role;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class AdminController extends Controller
{
//
public function index(){
return view('admin');
if(!\Session::get('user')){
return redirect()->route('home');
}
return view('admin.index');
}
public function daftar(){
return view('admin.ahli');
}
public function lihatuser(){
$user = User::where('id_role','=','1')->paginate(5);
return view('admin.lihat',compact('user'));
}
public function lihatchecking(){
$fix = \DB::table('user_comments')->join('comments','user_comments.comment_id','=','comments.comment_id')
->select('user_com_id','user_comments.comment_id','fix_comment','comment_content','username','status')->paginate(5);
return view('admin.lihatfixed',compact('fix'));
}
public function sendnotif(Request $request){
if($request->total >= 30 && $request->total <=70){
\DB::table('notifikasi_user')->insertGetId(['username'=>$request->id,'id_reward'=>121]);
\DB::table('user_comments')->where('username','=',$request->id)->update(['status'=>1]);
\Session::flash('sukses','Berhasil Mengirim Hadiah');
return redirect()->route('adminn');
}
}
public function sendnotifid(Request $request){
if($request->total >= 70 && $request->total <=120){
\DB::table('notifikasi_user')->insertGetId(['username'=>$request->id,'id_reward'=>121]);
\DB::table('word_users')->where('username','=',$request->id)->update(['status'=>1]);
\Session::flash('sukses','Berhasil Mengirim Hadiah');
return redirect()->route('adminn');
}
}
public function prosesDaftar(Request $request){
$role = Role::where('role','ahli bahasa')->first();
$this->validate($request,[
'username' =>'required|min:6|unique:users',
'email'=>'required|email|unique:users',
'password'=>'required|min:6|confirmed',
]);
User::create([
'nama'=>$request->nama,
'username'=>$request->username,
'email'=>$request->email,
'no_telpon'=>0,
'password'=>bcrypt($request->password),
'id_role'=>$role->id_role,
]);
\Session::flash('sukses','Ahli Bahasa Sudah Di masukkan');
return redirect()->route('adminn');
}
public function notif(){
$notif = \DB::table('user_comments')->select(\DB::raw('count(*) as total,username'))->where('status','=',1)->havingRaw('COUNT(*)>=30')->groupBy('username')->get();
$word = \DB::table('word_users')->select(\DB::raw('count(*) as total,username'))->where('status','=',1)->havingRaw('COUNT(*)>=70')->groupBy('username')->get();
return view('admin.notif',compact('notif','word'));
}
public function show(){
$user = User::paginate(1);
$user = User::paginate(10);
return view('admin.lihatuser',['user'=>$user]);
}
public function logout(){
\Session::flush();
return redirect()->route('home');
}
public function lihatword(){
$sentence = \DB::table('sentences')->join('words','sentences.sentence_id','=','words.sentence_id')
->join('word_users','words.words_id','=','word_users.words_id')
->join('categories_words','word_users.category_id','=','categories_words.category_id')
->select('word_users.id_word_users','sentences.sentece','words.words','categories_words.word_cat','word_users.username','word_users.status')->paginate(6);
return view('admin.lihatword',compact('sentence'));
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AhliController extends Controller
{
//
public function index(){
return view('ahlibahasa.index');
}
public function periksa(){
$sentence = \DB::table('sentences')->join('words','sentences.sentence_id','=','words.sentence_id')
->join('word_users','words.words_id','=','word_users.words_id')
->join('categories_words','word_users.category_id','=','categories_words.category_id')
->select('word_users.id_word_users','sentences.sentece','words.words','categories_words.word_cat','word_users.username')
->where('status','=',0)->paginate(6);
return view('ahlibahasa.periksa',compact('sentence'));
}
public function periksacheck(){
$fix = \DB::table('user_comments')->join('comments','user_comments.comment_id','=','comments.comment_id')
->where('status','=','0')
->select('user_com_id','user_comments.comment_id','fix_comment','comment_content','username')->paginate(5);
return view('ahlibahasa.periksachecking',compact('fix'));
}
public function update($id){
$fix = \DB::table('user_comments')->where('user_com_id',$id)->update(['status'=>1]);
\Session::flash('sukses','Berhasil Menyetujui');
return redirect()->route('checking');
}
public function reject($id){
$fix = \DB::table('user_comments')->where('user_com_id',$id)->update(['status'=>2]);
\Session::flash('sukses','Berhasil Menolak');
return redirect()->route('checking');
}
public function updateword($id){
$fix = \DB::table('word_users')->where('id_word_users','=',$id)->update(['status'=>1]);
\Session::flash('sukses','Berhasil Menyetujui');
return redirect()->route('periksacheck');
}
public function rejectword($id){
$fix = \DB::table('word_users')->where('id_word_users','=',$id)->update(['status'=>2]);
\Session::flash('sukses','Berhasil Menolak');
return redirect()->route('periksacheck');
}
}
......@@ -26,7 +26,7 @@ class LoginController extends Controller
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
......
<?php
namespace App\Http\Controllers;
use Twilio\Rest\Verify\V2\Service\VerificationCheckInstance;
use Twilio\Rest\Client;
use Illuminate\Http\Request;
use App\User;
class AuthController extends Controller
{
//
public function postLogin(Request $request){
$credentials = [
'email' => $request['username'],
'password' => $request['password'],
];
if(!\Auth::attempt($credentials)){
return redirect()->back();
}
else if(\Auth::attempt($credentials) && \Auth::user()->role == 1)
return redirect()->route('admin');
else if(\Auth::attempt($credentials) && \Auth::user()->role == 2)
return redirect()->route('user');
}
public function postRegister(Request $request){
$this->validate($request,[
'username' =>'required|min:4',
'email'=>'required|email|unique:users',
'password'=>'required|min:6|confirmed'
]);
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio_sid = getenv("TWILIO_SID");
$twilio_verify_sid = getenv("TWILIO_VERIFY_SID");
$twilio = new Client($twilio_sid, $token);
$twilio->verify->v2->services($twilio_verify_sid)
->verifications
->create($request->number, "sms");
User::create([
'firstname' => $request->namadepan,
'lastname' => $request->namabelakang,
'gender' => $request->gender,
'username' => $request->username,
'email'=> $request->email,
'password'=>bcrypt($request->password),
'role'=> $request->role,
'phone_number'=>$request->number,
]);
return redirect()->route('verify')->with(['phone_number' => $request->number]);
}
public function login(){
return view('index');
}
public function register(){
return view('index');
}
public function logout(){
\Auth::logout();
return redirect()->route('back');
}
protected function verify(Request $request)
{
$data = $request->validate([
'verification_code' => ['required', 'numeric'],
'phone_number' => ['required', 'string'],
]);
/* Get credentials from .env */
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio_sid = getenv("TWILIO_SID");
$twilio_verify_sid = getenv("TWILIO_VERIFY_SID");
$twilio = new Client($twilio_sid, $token);
$verification = $twilio->verify->v2->services($twilio_verify_sid)
->verificationChecks
->create($data['verification_code'], array('to' => $data['phone_number']));
if ($verification->valid) {
$user = tap(User::where('phone_number', $data['phone_number']))->update(['isVerified' => true]);
/* Authenticate user */
\Session::flash('sukses','Nomor sudah terverifikasi silahkan login');
return redirect()->route('back');
}
return back()->with(['phone_number' => $data['phone_number'], 'error' => 'Invalid verification code entered!']);
}
}
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use ConsoleTVs\Charts\Classes\C3\Chart;
class PostagController extends Controller
{
//
public function index(){
if(\Session::has('user')){
$subject = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',1)->where('status','=',0)->first();
$predikat = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',2)->where('status','=',0)->first();
$keterangan = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',3)->where('status','=',0)->first();
$pie = \Charts::create('pie', 'highcharts')
->title('Chart Pelabelan yang belum di approve ahli bahasa')
->labels(['Subjek', 'Predikat', 'Keterangan'])
->values([$subject->total,$predikat->total,$keterangan->total])
->dimensions(1000,500)
->responsive(true);
$subject = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',1)->where('status','=',1)->first();
$predikat = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',2)->where('status','=',1)->first();
$keterangan = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',3)->where('status','=',1)->first();
$pies = \Charts::create('pie', 'highcharts')
->title('Chart Pelabelan yang sudah di approve ahli bahasa')
->labels(['Subjek', 'Predikat', 'Keterangan'])
->values([$subject->total,$predikat->total,$keterangan->total])
->dimensions(1000,500)
->responsive(true);
$subject = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',1)->where('status','=',2)->first();
$predikat = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',2)->where('status','=',2)->first();
$keterangan = DB::table('word_users')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('category_id','=',3)->where('status','=',2)->first();
$piet = \Charts::create('pie', 'highcharts')
->title('Chart Pelabelan yang di tolak ahli bahasa')
->labels(['Subjek', 'Predikat', 'Keterangan'])
->values([$subject->total,$predikat->total,$keterangan->total])
->dimensions(1000,500)
->responsive(true);
$fixcom = DB::table("user_comments")->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('status','=',1)->first();
$ignorecom = DB::table("user_comments")->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('status','=',2)->first();
$waitcom = DB::table("user_comments")->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->where('status','=',0)->first();
$fix = \Charts::create('pie', 'highcharts')
->title('Chart Memperbaiki kalimat')
->labels(['Yang sudah Benar', 'Yang Salah', 'Menunggu'])
->values([$fixcom->total,$ignorecom->total,$waitcom->total])
->dimensions(1000,500)
->responsive(true);
return view('user.index1',compact('pie','pies','piet','fix'));
}else{
return redirect()->route('home');
}
}
public function coba(){
$news = DB::table('news')->get(['news']);
// $news = explode(chr(1),str_replace(array(' '),chr(1),$news));
// $split = explode(chr(3),str_replace(array('.',' ',','),chr(3),$row['news']));
// echo "<pre>";
// var_dump($news);
// die();
return view('debug.coba',compact('news',$news));
}
public function store(Request $request){
$sentence = $request->new;
$idsentence = $request->id;
$kategori = $request->kategori;
$total = count($request->id);
for($i = 0; $i < $total; $i++){
DB::table('words')->insert(['words'=>$sentence[$i],'sentence_id'=>$idsentence[$i]]);
$kategoris = DB::table('words')->orderBy('words_id','desc')->get('words_id')->first();
DB::table('word_users')->insert(['words_id'=>$kategoris->words_id,'words'=>$sentence[$i],'username'=>\Session::get('user')['username'],
'category_id'=>$kategori[$i],'status'=>0]);
}
\Session::flash('sukses','Terimakasih Sudah Melakukan Pelabelan');
return redirect()->route('user');
}
public function profile(){
$reward = DB::table('notifikasi_user')->select(DB::raw('count(*) as total'))->where('username','=',\Session::get('user')['username'])->first();
// var_dump($reward);
// die();
return view('user.profile',compact('reward'));
}
public function logout(){
\Session::flush();
return redirect()->route('home');
}
public function tagging(){
$news = DB::table('sentences')->get()->random(5);
$pilih['news'] =$news;
$kategori = DB::table('categories_words')->get();
$pilih['kategori'] =$kategori;
// $news = explode(chr(1),str_replace(array(' '),chr(1),$news));
// $split = explode(chr(3),str_replace(array('.',' ',','),chr(3),$row['news']));
// echo "<pre>";
// die();
return view('user.tagging',compact('pilih',$pilih));
}
public function fixxing(){
$comment = DB::table('comments')->get()->random(7);
return view('user.fixxing',compact('comment',$comment));
}
public function doFix(Request $request){
$count = count($request->comment);
for($i = 0; $i <$count;$i++){
if(empty($request->comment[$i])){
\Session::flash('kosong','Harap mengisi semua field');
return redirect()->route('fixxing');
}
}
for($i = 0; $i <$count;$i++){
DB::table('user_comments')->insertGetId(['username'=>\Session::get('user')['username'],'comment_id'=>$request->id[$i],'fix_comment'=>$request->comment[$i],'status'=>0]);
}
\Session::flash('sukses','Terimakasih Sudah Melakukan perbaikan');
return redirect()->route('user');
}
public function notif(){
$notif = \DB::table('notifikasi_user')->join('reward','notifikasi_user.id_reward','=','reward.id_reward')->where('username','=',\Session::get('user')['username'])->get();
return view('user.notif',compact('notif'));
}
}
<?php
namespace App\Http\Controllers;
use Twilio\Rest\Verify\V2\Service\VerificationCheckInstance;
use Twilio\Rest\Client;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Role;
use App\User;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
$role = Role::where('role','user')->first();
$this->validate($request,[
'username' =>'required|min:6|unique:users',
'email'=>'required|email|unique:users',
'password'=>'required|min:6|confirmed',
'no_telpon'=>'required|unique:users'
]);
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio_sid = getenv("TWILIO_SID");
$twilio_verify_sid = getenv("TWILIO_VERIFY_SID");
$twilio = new Client($twilio_sid, $token);
$twilio->verify->v2->services($twilio_verify_sid)
->verifications
->create($request->no_telpon, "sms");
User::create([
'nama'=>$request->nama,
'username'=>$request->username,
'email'=>$request->email,
'no_telpon'=>$request->no_telpon,
'password'=>bcrypt($request->password),
'id_role'=>$role->id_role,
]);
return redirect()->route('verify')->with(['phone_number' => $request->no_telpon]);
}
protected function verify(Request $request)
{
$data = $request->validate([
'verification_code' => ['required', 'numeric'],
'phone_number' => ['required', 'string'],
]);
/* Get credentials from .env */
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio_sid = getenv("TWILIO_SID");
$twilio_verify_sid = getenv("TWILIO_VERIFY_SID");
$twilio = new Client($twilio_sid, $token);
$verification = $twilio->verify->v2->services($twilio_verify_sid)
->verificationChecks
->create($data['verification_code'], array('to' => $data['phone_number']));
if ($verification->valid) {
$user = tap(User::where('no_telpon', $data['phone_number']))->update(['isVerified' => true]);
/* Authenticate user */
\Session::flash('sukses','Nomor sudah terverifikasi silahkan login');
return redirect()->route('home');
}
return back()->with(['phone_number' => $data['phone_number'], 'error' => 'Invalid verification code entered!']);
}
public function postLogin(Request $request){
$credentials = [
'email' => $request['username'],
'password' => $request['password'],
];
$user = User::where('email',$request->username)->first();
if(\Auth::attempt($credentials) == 1 && $user->id_role==1){
\Session::put('user',$user);
return redirect()->route('user');
}
if(\Auth::attempt($credentials) == 1 && $user->id_role==2){
\Session::put('user',$user);
return redirect()->route('adminn');
}
if(\Auth::attempt($credentials) == 1 && $user->id_role==3){
\Session::put('user',$user);
return redirect()->route('ahlibahasa');
}
if(\Auth::attempt($credentials) == 0){
// \Session::put('user',$user);
\Session::flash('gagal','Akun tidak ditemukan, Silahkan Register');
return redirect()->route('home');
}
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
}
}
......@@ -60,7 +60,7 @@ class Kernel extends HttpKernel
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'role' => \App\Http\Middleware\Role::class,
'role'=> \App\Http\Middleware\Role::class,
];
/**
......
<?php
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Auth;
use Closure;
class Role
......@@ -15,16 +15,19 @@ class Role
*/
public function handle($request, Closure $next)
{
$user = \Auth::user();
if(\Auth::check()){
if($user->role == 1){
$user = \Session::get('user');
if(\Session::has('user')){
if($user->id_role==1){
return $next($request);
}
if($user->id_role==2){
return $next($request);
}
if($user->role == 2){
if($user->id_role==3){
return $next($request);
}
}else{
return redirect()->route('back');
return redirect()->route('home');
}
}
}
......@@ -3,7 +3,7 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider
{
/**
......@@ -24,6 +24,5 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
//
Schema::defaultStringLength(191);
}
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Role extends Model
{
//
protected $primaryKey = 'id_role';
protected $fillable = [
'role',
];
public function user(){
$this->hasOne('App\User');
}
}
......@@ -5,35 +5,25 @@ namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
// use tidy;
// use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
class User extends Authenticatable
{
use Notifiable;
protected $table = 'users';
// public $role_id;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $primayKey = 'username';
protected $fillable = [
'username', 'email', 'password','firstname','lastname','gender','role','phone_number','isVerified'
'nama', 'username', 'email','no_telpon','password','id_role'
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token'
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
public function user(){
return $this->belongsTo('App\User');
}
public $timestamps = false;
}
......@@ -9,10 +9,11 @@
"license": "MIT",
"require": {
"php": "^7.1.3",
"consoletvs/charts": "5.*",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.8.*",
"laravel/tinker": "^1.0",
"twilio/sdk": "^6.2"
"twilio/sdk": "^6.4"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
......
......@@ -174,7 +174,7 @@ return [
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
ConsoleTVs\Charts\ChartsServiceProvider::class,
],
/*
......@@ -225,7 +225,7 @@ return [
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Charts' => ConsoleTVs\Charts\Facades\Charts::class,
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default library used in charts.
|--------------------------------------------------------------------------
|
| This value is used as the default chart library used when creating
| any chart in the command line. Feel free to modify it or set it up
| while creating the chart to ignore this value.
|
*/
'default_library' => 'Chartjs',
];
......@@ -15,14 +15,9 @@ class CreateUsersTable extends Migration
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('firstname');
$table->string('lastname');
$table->string('gender');
$table->string('username');
$table->integer('role');
$table->string('phone_number')->unique();
$table->string('name');
$table->string('email')->unique();
$table->string('isVerified')->default(false);
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* Start Bootstrap - Simple Sidebar (https://startbootstrap.com/template-overviews/simple-sidebar)
* Copyright 2013-2019 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/blob/master/LICENSE)
*/
body {
overflow-x: hidden;
}
#sidebar-wrapper {
min-height: 100vh;
margin-left: -15rem;
-webkit-transition: margin .25s ease-out;
-moz-transition: margin .25s ease-out;
-o-transition: margin .25s ease-out;
transition: margin .25s ease-out;
}
#sidebar-wrapper .sidebar-heading {
padding: 0.875rem 1.25rem;
font-size: 1.2rem;
background-color: #d7ebf4 !im;
}
#sidebar-wrapper .list-group {
width: 15rem;
}
#page-content-wrapper {
min-width: 100vw;
}
#wrapper.toggled #sidebar-wrapper {
margin-left: 0;
}
#navbar-head{
background-color: #d7ebf4 !important;
}
@media (min-width: 768px) {
#sidebar-wrapper {
margin-left: 0;
}
#page-content-wrapper {
min-width: 0;
width: 100%;
}
#wrapper.toggled #sidebar-wrapper {
margin-left: -15rem;
}
}
public/image/checking1.png

17.2 KB

public/image/logo1.png

6.33 KB

public/image/notif1.png

27.9 KB

public/image/tagging2.png

15 KB

public/image/user-1.png

16.5 KB

public/image/user.png

7.07 KB

@extends('layout.layout')
@section('title','Dashboar Admin')
@section('button')
<a href="{{route('logout')}}" class="btn btn-primary">Logout</a>
@endsection
@section('container')
<div>
<div class="jumbotron jumbotron-fluid">
<h1 style="text-align:center;">POST TAG</h1>
</div>
</div>
<div class="row" style="padding:200px">
<div class="col-md-3" style="background-color:white; float:left; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">User</h1>
<center><i class="fas fa-users fa-8x"></i></center>
<a href="{{route('lihatuser')}}"><div style="background-color:white;"><h1 style="text-align:center;">Lihat</h1></div></a>
</div>
<div class="col-md-1 ">
</div>
<div class="col-md-3" style="background-color:white; float:left; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">User</h1>
<center><i class="fas fa-users fa-8x"></i></center>
<div></div>
</div>
<div class="col-md-1 ">
</div>
<div class="col-md-3" style="background-color:white; float:left; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">User</h1>
<center><i class="fas fa-users fa-8x"></i></center>
<div></div>
</div>
</div>
</div>
@endsection
@extends('layout.layout')
@section('title','Daftar Ahli Bahasa')
@section('button')
<a href="{{route('daftarahlibahasa')}}">Daftar Ahli bahasa</a>
<a href="{{route('adminn')}}" class="btn btn-success">Beranda</a>
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
@endsection
@section('container')
<a href="{{route('adminn')}}"> &nbsp;<--Back</a>
<br><br>
<form action="{{route('daftarahli')}}" class="formstyle" method="POST">
{{ csrf_field() }}
<div class="row register-form">
<h4 class="formstyle">Daftar Ahli Bahasa</h4>
<div class="col-md-12">
<div class="form-group">
<input type="text" name="nama" class="form-control" placeholder="Nama Depan" value="{{old('namadepan')}}"/>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="email" name="email" placeholder="Email *" class="form-control {{$errors->has('email')?'is-invalid':''}}" value="{{old('email')}}">
@if($errors->has('email'))
<div class="invalid-feedback">
{{$errors->first('email')}}
</div>
@endif
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="text" name="username" placeholder="Username" class="form-control {{$errors->has('username')?'is-invalid':''}}" value="{{old('username')}}">
@if($errors->has('username'))
<div class="invalid-feedback">
{{$errors->first('username')}}
</div>
@endif
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="password" name="password" placeholder="Kata Sandi" class="form-control {{$errors->has('password')?'is-invalid':''}}" required>
@if($errors->has('password'))
<div class="invalid-feedback">
{{$errors->first('password')}}
</div>
@endif
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="password" name="password_confirmation" placeholder="Konfirmasi Kata Sandi" class="form-control" required>
</div>
</div>
<div class="col-md-12">
<input type="submit" class="form-control btn btn-primary">
</div>
</div>
</form>
@endsection
@extends('layout.layout')
@section('title','Dashboard')
@section('button')
<a href="{{route('daftarahlibahasa')}}">Daftar Ahli bahasa</a>
<a href="{{route('adminn')}}" class="btn btn-success">Beranda</a>
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
@endsection
@section('container')
<div>
<div class="jumbotron jumbotron-fluid">
<h1 style="text-align:center;">Selamat Datang Admin</h1>
</div>
<div class="row">
<div class="col-md-12">
@if($message = \Session::get('sukses'))
<div class="alert alert-success alert-block">
{{$message}}
</div>
@endif
</div>
<div class="col-md-3 ml-5" style="background-color:white; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">User</h1>
<center><img src="{{asset('/image/user-1.png')}}" width="200px" alt="" srcset=""></center>
<div style="background-color:white;"><a href="{{route('lihatuser')}}"><h1 style="text-align:center;">Lihat</h1></a></div>
</div>
<div class="col-md-3 ml-5" style="background-color:white; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">Pelabelan Kata</h1>
<center><img src="{{asset('/image/tagging2.png')}}" width="200px" alt="" srcset=""></center>
<div style="background-color:white;"><a href="{{route('lihatword')}}"><h1 style="text-align:center;">Lihat</h1></a></div>
</div>
<div class="col-md-3 ml-5" style="background-color:white; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">Perbaikan Kalimat</h1>
<center><img src="{{asset('/image/checking1.png')}}" width="200px" alt="" srcset=""></center>
<div style="background-color:white;"><a href="{{route('lihatfixed')}}"><h1 style="text-align:center;">Lihat</h1></a></div>
</div>
<div class="col-md-4"></div>
<div class="col-md-3 mt-5" style="background-color:white; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">Notifikasi</h1>
<center><img src="{{asset('/image/notif1.png')}}" width="200px" alt="" srcset=""></center>
<div style="background-color:white;"><a href="{{route('notif')}}"><h1 style="text-align:center;">Lihat</h1></a></div>
</div>
</div>
<br><br>
</div>
@endsection
@extends('layout.layout')
@section('title','Dashboard')
@section('button')
<a href="{{route('daftarahlibahasa')}}">Daftar Ahli bahasa</a>
<a href="{{route('adminn')}}" class="btn btn-success">Beranda</a>
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
@endsection
@section('container')
<div class="container">
<table class="table table-striped">
@if($message = \Session::get('sukses'))
<div class="alert alert-success alert-block">
{{$message}}
</div>
@endif
<tr>
<th>Nama</th>
<th>Username</th>
<th>Email</th>
<th>No Telepon</th>
</tr>
@foreach($user as $users)
<tr>
<td>{{$users->nama}}</td>
<td>{{$users->username}}</td>
<td>{{$users->email}}</td>
<td>
{{$users->no_telpon}}
</td>
</tr>
@endforeach
</table>
{{$user->links()}}
</div>
@endsection
@extends('layout.layout')
@section('title','Dashboard')
@section('button')
<a href="{{route('daftarahlibahasa')}}">Daftar Ahli bahasa</a>
<a href="{{route('adminn')}}" class="btn btn-success">Beranda</a>
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
@endsection
@section('container')
<div class="container">
<table class="table table-striped">
@if($message = \Session::get('sukses'))
<div class="alert alert-success alert-block">
{{$message}}
</div>
@endif
<tr>
<th>Komen dari Berita</th>
<th>Perbaikan dari user</th>
<th>User</th>
<th colspan="2">Status</th>
</tr>
@foreach($fix as $value)
<tr>
<td>{{$value->comment_content}}</td>
<td>{{$value->fix_comment}}</td>
<td>{{$value->username}}</td>
<td>
@if($value->status == 0)
<h5 style="color: grey">Menunggu</h5>
@elseif($value->status == 1)
<h5 style="color: green">Benar</h5>
@else
<h5 style="color: red">Salah</h5>
@endif
<td>
</tr>
@endforeach
</table>
{{$fix->links()}}
</div>
@endsection
@extends('../layout/layout')
@section('title','Daftar User')
@section('container')
@foreach($user as $users)
{{$users->firstname}}
@endforeach
{{$user->links()}}
@endsection
\ No newline at end of file
@extends('layout.layout')
@section('title','Dashboard')
@section('button')
<a href="{{route('daftarahlibahasa')}}">Daftar Ahli bahasa</a>
<a href="{{route('adminn')}}" class="btn btn-success">Beranda</a>
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
@endsection
@section('container')
<div class="container">
<table class="table table-striped">
@if($message = \Session::get('sukses'))
<div class="alert alert-success alert-block">
{{$message}}
</div>
@endif
<tr>
<th>No</th>
<th>Kata</th>
<th>label</th>
<th>Kalimat</th>
<th colspan="2">Status</th>
</tr>
@foreach($sentence as $value)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$value->words}}</td>
<td>{{$value->word_cat}}</td>
<td>{{$value->sentece}}</td>
<td>
@if($value->status == 0)
<h4 style="color: grey">Menunggu</h4>
@elseif($value->status == 1)
<h4 style="color: green">Benar</h4>
@else
<h4 style="color: red">Salah</h4>
@endif
<td>
</tr>
@endforeach
</table>
{{$sentence->links()}}
</div>
@endsection
@extends('layout.layout')
@section('title','Dashboard')
@section('button')
<a href="{{route('daftarahlibahasa')}}">Daftar Ahli bahasa</a>
<a href="{{route('adminn')}}" class="btn btn-success">Beranda</a>
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
@endsection
@section('container')
<div class="container">
<br>
<table class="table table-striped">
<tr>
<th>
Username
</th>
<th>
Keterangan
</th>
<th>
Option
</th>
</tr>
@foreach($notif as $value)
<tr>
<td>
{{$value->username}}
</td>
<td>
Sudah Memperbaiki {{$value->total}} Komen
</td>
<td>
<a href="/kirim/{{$value->username}}/{{$value->total}}" class="btn btn-success">Kirim Hadiah</a>
</td>
</tr>
@endforeach
@foreach($word as $value)
<tr>
<td>
{{$value->username}}
</td>
<td>
Sudah Melabel sebanyak {{$value->total}} kata
</td>
<td>
<a href="/kirimid/{{$value->username}}/{{$value->total}}" class="btn btn-success">Kirim Hadiah</a>
</td>
</tr>
@endforeach
</table>
</div>
@endsection
@extends('layout.layout')
@section('title','Dashboard')
@section('button')
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
<a href="{{route('ahlibahasa')}}" class="btn btn-success">Beranda</a>
@endsection
@section('container')
<div>
<div class="jumbotron jumbotron-fluid">
<h1 style="text-align:center;">Selamat Datang Ahli Bahasa</h1>
</div>
<div class="row" style="padding: 100px">
<div class="col-md-5" style="background-color:white; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">Periksa Kalimat</h1>
<center><img src="{{asset('/image/checking1.png')}}" width="200px" alt="" srcset=""></center>
<div style="background-color:lightblue;"><a href="{{route('checking')}}"><h1 style="text-align:center;">Periksa</h1></a></div>
</div>
<div class="col-md-1"></div>
<div class="col-md-5" style="background-color:white; border:1px solid black; border-radius:10px;">
<h1 style="text-align:center">Periksa Pelabelan</h1>
<center><img src="{{asset('/image/tagging2.png')}}" width="200px" alt="" srcset=""></center>
<div style="background-color:lightblue;"><a href="{{route('periksacheck')}}"><h1 style="text-align:center;">Periksa</h1></a></div>
</div>
</div>
<br><br>
</div>
@endsection
@extends('layout.layout')
@section('title','Dashboard')
@section('button')
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
<a href="{{route('ahlibahasa')}}" class="btn btn-success">Beranda</a>
@endsection
@section('container')
<div class="container">
<table class="table table-striped">
@if($message = \Session::get('sukses'))
<div class="alert alert-success alert-block">
{{$message}}
</div>
@endif
<tr>
<th>No</th>
<th>Kata</th>
<th>Label</th>
<th>Kalimat</th>
<th>Username</th>
<th colspan="2" style="text-align: center">Option</th>
</tr>
@foreach($sentence as $value)
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$value->words}}</td>
<td>{{$value->word_cat}}</td>
<td>{{$value->sentece}}</td>
<td>{{$value->username}}</td>
<td>
<a href="/updateword/{{$value->id_word_users}}" class="btn btn-success">Setuju</a>
</td>
<td>
<a href="/rejectword/{{$value->id_word_users}}" class="btn btn-danger">Tolak</a>
</td>
</tr>
@endforeach
</table>
{{$sentence->links()}}
</div>
@endsection
@extends('layout.layout')
@section('title','Dashboard')
@section('button')
<a href="{{route('logout')}}" class="btn btn-warning">Logout</a>
<a href="{{route('ahlibahasa')}}" class="btn btn-success">Beranda</a>
@endsection
@section('container')
<div class="container">
<table class="table table-striped">
@if($message = \Session::get('sukses'))
<div class="alert alert-success alert-block">
{{$message}}
</div>
@endif
<tr>
<th>Komen dari Berita</th>
<th>Perbaikan dari user</th>
<th>Username</th>
<th colspan="2">Option</th>
</tr>
@foreach($fix as $value)
<tr>
<td>{{$value->comment_content}}</td>
<td>{{$value->fix_comment}}</td>
<td>{{$value->username}}</td>
<td>
<a href="/update/{{$value->user_com_id}}" class="btn btn-success">Setuju</a>
</td>
<td>
<a href="/reject/{{$value->user_com_id}}" class="btn btn-danger">Tolak</a>
</td>
</tr>
@endforeach
</table>
{{$fix->links()}}
</div>
@endsection
<h2>Selamat datang {{Auth::user()->firstname}}</h2>
<a href="{{route('logout')}}"> Logout </a>
\ No newline at end of file
@extends('layout.layout')
@section('title','Dashboard')
@section('container')
@if($message = \Session::get('sukses'))
<div class="alert alert-success alert-block">
<strong>{{$message}}</strong>
</div>
@endif
<div class="container register">
<div class="row">
<div class="col-md-7 register-left">
<h1 style="color: ; margin-top:70px; font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif">Postag Indonesia</h1>
<h4 style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif">POS Tag merupakan suatu cara pengkategorian kelas kata, seperti kata benda, kata kerja, kata sifat, dan lain-lain</h4>
</div>
<div class="col-md-5 register-right">
<ul class="nav nav-tabs nav-justified" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Register</a>
</li>
</ul>
<div class="tab-content" id="myTabContent" style="background:white;box-sizing:border-box; border:2px solid white;">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<br>
<form action="/login" method="post">
{{ csrf_field() }}
<div class="row register-form">
<div class="col-md-12">
<div class="form-group">
<input type="text" name="username" class="form-control" placeholder="Nama Pengguna">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="password" name="password" class="form-control" placeholder="Kata Sandi">
</div>
</div>
<div class="col-md-12">
<input type="submit" class="form-control btn btn-primary">
</div>
</div>
</form>
</div>
<div class="tab-pane fade show " id="profile" role="tabpanel" aria-labelledby="profile-tab">
<br>
<form action="/register" method="POST">
{{ csrf_field() }}
<div class="row register-form">
<div class="col-md-6">
<div class="form-group">
<input type="text" name="namadepan" class="form-control" placeholder="Nama Depan *" value="{{old('namadepan')}}"/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="text" name="namabelakang" class="form-control" placeholder="Nama Belakang *" value="{{old('namabelakang')}}"/>
</div>
</div>
<div class="col-md-12">
Jenis Kelamin
</div>
<div class="col-md-12">
<div class="form-group">
<div class="maxl">
<label class="radio inline">
<input type="radio" name="gender" value="male" checked>
<span> Male </span>
</label>
<label class="radio inline">
<input type="radio" name="gender" value="female">
<span>Female </span>
</label>
</div>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="email" name="email" placeholder="Email" class="form-control {{$errors->has('email')?'is-invalid':''}}" value="{{old('email')}}">
@if($errors->has('email'))
<div class="invalid-feedback">
{{$errors->first('email')}}
</div>
@endif
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="text" name="username" placeholder="Username" class="form-control {{$errors->has('username')?'is-invalid':''}}" value="{{old('username')}}">
@if($errors->has('username'))
<div class="invalid-feedback">
{{$errors->first('username')}}
</div>
@endif
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="password" name="password" placeholder="Kata Sandi" class="form-control {{$errors->has('password')?'is-invalid':''}}" required>
@if($errors->has('password'))
<div class="invalid-feedback">
{{$errors->first('password')}}
</div>
@endif
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="password" name="password_confirmation" placeholder="Konfirmasi Kata Sandi" class="form-control" required>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="number" name = "role" min="1" max="4">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<input type="text" name="number" id="" class="form-control" placeholder="Nomor Telepon">
</div>
</div>
<div class="col-md-12">
<input type="submit" class="form-control btn btn-primary">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" href="{{asset('/image/logo.png')}}">
<title>@yield('title')</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{asset('/css/bootstrap.min.css')}}">
<link href="{{asset('/css/bootstrap.min.css')}}">
<script src="{{asset('/js/jquery.min.js')}}"></script>
<script src="{{asset('/js/bootstrap.min.js')}}"></script>
<script src="{{asset('/js/popper.js')}}"></script>
<style type="text/css">
body {
background-image: url('{{ asset('/image/bg2.jpg')}}');
/* Center and scale the image nicely */
background-repeat: no-repeat;
background-size: cover;
}
.w-80{width:80%!important}
.formstyle{
max-width: 500px;
margin: auto;
background: white;
padding: 10px;
}
</style>
</head>
<body>
......@@ -19,11 +33,21 @@
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="{{asset('/js/font.js')}}" crossorigin="anonymous"></script>
<style>
</style>
<!------ Include the above in your HEAD tag ---------->
<div class="d-flex bd-highlight">
<div class="p-2 w-100 bd-highlight">
<div class="p-2 w-75 bd-highlight">
<img src="{{asset('/image/logo.png')}}" alt=""></div>
<div class="p-2 flex-shrink-1 bd-highlight mt-4 mr-3">@yield('button')</div>
<div class="p-2 flex-shrink-1 bd-highlight mt-4">@yield('button')</div>
</div>
@yield('container')
\ No newline at end of file
@yield('container')
<script>
$("document").ready(function(){
setTimeout(function(){
$("div.alert").fadeOut(1000);
}, 2000 ); // 5 secs
});
</script>
\ No newline at end of file
@extends('layout.layout')
@section('container')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">{{ __('Verify Your Phone Number') }}</div>
<div class="card-body">
@if (session('error'))
<div class="alert alert-danger" role="alert">
{{session('error')}}
</div>
@endif
Please enter the OTP sent to your number: {{session('phone_number')}}
<form action="{{route('verify')}}" method="post">
@csrf
<div class="form-group row">
<label for="verification_code"
class="col-md-4 col-form-label text-md-right">{{ __('Phone Number') }}</label>
<div class="col-md-6">
<input type="hidden" name="phone_number" value="{{session('phone_number')}}">
<input id="verification_code" type="tel"
class="form-control @error('verification_code') is-invalid @enderror"
name="verification_code" value="{{ old('verification_code') }}" required>
@error('verification_code')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row mb-0">
<div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary">
{{ __('Verify Phone Number') }}
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
\ No newline at end of file
@extends('layout.layout')
@section('title','Dashboard User')
@section('container')
Selamat datang User
<a href="{{route('logout')}}"> Logout </a>
@endsection
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="{{asset('/image/logo.png')}}">
<title>POSTAG</title>
<!-- Bootstrap core CSS -->
<link href="{{asset('/css/bootstrap.min1.css')}}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{{asset('/css/simple-sidebar.css')}}" rel="stylesheet">
</head>
<body>
<div class="d-flex" id="wrapper">
<!-- Sidebar -->
<div class="border-right" id="sidebar-wrapper" style="background-color: #d7ebf4">
<div class="sidebar-heading"><img src="{{asset('/image/logo1.png')}}">POSTAG </div>
<div class="list-group list-group-flush" style="background-color: #d7ebf4">
<a href="{{route('user')}}" class="list-group-item list-group-item-action">Beranda</a>
<a href="{{route('fixxing')}}" class="list-group-item list-group-item-action">Memperbaiki Kalimat</a>
<a href="{{route('tagging')}}" class="list-group-item list-group-item-action ">Pelabelan Kata</a>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-light border-bottom" style="background-color: #d7ebf4">
<button class="btn btn-primary" id="menu-toggle">=</button>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#a" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Selamat datang,{{\Session::get('user')['nama']}}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{route('profile')}}">Profil</a>
<a class="dropdown-item" href="#">Notifikasi</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{route('logoutuser')}}">Keluar</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
@if($message = \Session::get('kosong'))
<div class="alert alert-danger alert-block">
<strong>{{$message}}</strong>
</div>
@endif
<div class="row mt-3">
<div class="col-md-12">
<h3 style="text-align: center; font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif">Silahkan Perbaiki Kalimat tersebut</h3>
</div>
<div class="col-md-12">
<form action="{{route('dofix')}}" method="POST">
<input type="hidden" name="_token" value="{{csrf_token()}}">
@php($id = 0)
@foreach($comment as $com)
<input type="hidden" name="id[]" value="{{$com->comment_id}}">
<h6>{{$com->comment_content}}</h6>
<input type="text" class="form-control" id="myText" name="comment[]"/>
@endforeach
<br>
<button class="btn btn-success" type="submit" id="start_button" name="submit">Submit</button>
</form>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Bootstrap core JavaScript -->
<script src="{{asset('/js/jquery.min1.js')}}"></script>
<script src="{{asset('/js/bootstrap.bundle.min.js')}}"></script>
<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
$("document").ready(function(){
setTimeout(function(){
$("div.alert").fadeOut(1000);
}, 2000 ); // 5 secs
});
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="{{asset('/image/logo.png')}}">
<title>POSTAG</title>
<!-- Bootstrap core CSS -->
<link href="{{asset('/css/bootstrap.min1.css')}}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{{asset('/css/simple-sidebar.css')}}" rel="stylesheet">
{{-- ChartScript --}}
</head>
<body>
<div class="d-flex" id="wrapper">
<!-- Sidebar -->
<div class="border-right" id="sidebar-wrapper" style="background-color: #d7ebf4">
<div class="sidebar-heading"><img src="{{asset('/image/logo1.png')}}">POSTAG </div>
<div class="list-group list-group-flush" style="background-color: #d7ebf4">
<a href="{{route('user')}}" class="list-group-item list-group-item-action">Beranda</a>
<a href="{{route('fixxing')}}" class="list-group-item list-group-item-action">Memperbaiki Kalimat</a>
<a href="{{route('tagging')}}" class="list-group-item list-group-item-action ">Pelabelan Kata</a>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-light border-bottom" style="background-color: #d7ebf4">
<button class="btn btn-primary" id="menu-toggle">=</button>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#a" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Selamat datang,{{\Session::get('user')['nama']}}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{route('profile')}}">Profil</a>
<a class="dropdown-item" href="{{route('notifuser')}}">Notifikasi</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{route('logoutuser')}}">Keluar</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
@if($message = \Session::get('sukses'))
<div class="alert alert-success alert-block">
{{$message}}
</div>
@endif
<div class="row">
<div class="col-md-4">
<div style="width:400px">
{!!$pie->html() !!}
</div>
</div>
<div class="col-md-4">
<div style="width:400px">
{!!$pies->html() !!}
</div>
</div>
<div class="col-md-4">
<div style="width:400px">
{!!$piet->html() !!}
</div>
</div>
<div class="col-md-12">
<div style="width:500px">
{!!$fix->html() !!}
</div>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Bootstrap core JavaScript -->
<script src="{{asset('/js/jquery.min1.js')}}"></script>
<script src="{{asset('/js/bootstrap.bundle.min.js')}}"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.0.6/highcharts.js" charset="utf-8"></script>
{!! Charts::scripts() !!}
{!! $pie->script() !!}
{!! $pies->script() !!}
{!! $piet->script() !!}
{!! $fix->script() !!}
<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
$("document").ready(function(){
setTimeout(function(){
$("div.alert").fadeOut(1000);
}, 2000 ); // 5 secs
});
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="{{asset('/image/logo.png')}}">
<title>POSTAG</title>
<!-- Bootstrap core CSS -->
<link href="{{asset('/css/bootstrap.min1.css')}}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{{asset('/css/simple-sidebar.css')}}" rel="stylesheet">
{{-- ChartScript --}}
</head>
<body>
<div class="d-flex" id="wrapper">
<!-- Sidebar -->
<div class="border-right" id="sidebar-wrapper" style="background-color: #d7ebf4">
<div class="sidebar-heading"><img src="{{asset('/image/logo1.png')}}">POSTAG </div>
<div class="list-group list-group-flush" style="background-color: #d7ebf4">
<a href="{{route('user')}}" class="list-group-item list-group-item-action">Beranda</a>
<a href="{{route('fixxing')}}" class="list-group-item list-group-item-action">Memperbaiki Kalimat</a>
<a href="{{route('tagging')}}" class="list-group-item list-group-item-action ">Pelabelan Kata</a>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-light border-bottom" style="background-color: #d7ebf4">
<button class="btn btn-primary" id="menu-toggle">=</button>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#a" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Selamat datang,{{\Session::get('user')['nama']}}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{route('profile')}}">Profil</a>
<a class="dropdown-item" href="{{route('notifuser')}}">Notifikasi</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{route('logoutuser')}}">Keluar</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<br>
<table class="table table-striped">
<tr>
<th>
Keterangan
</th>
<th>
Harga Reward
</th>
</tr>
@php($i = 0)
@foreach($notif as $value)
<tr>
<td>
Selamat {{$value->username}} Mendapatkan Reward
</td>
<td>
{{$value->reward}}
@php($i+=$value->reward)
</td>
</tr>
@endforeach
<tr>
<td>
Total
</td>
<td>
{{$i}}
</td>
</tr>
</table>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Bootstrap core JavaScript -->
<script src="{{asset('/js/jquery.min1.js')}}"></script>
<script src="{{asset('/js/bootstrap.bundle.min.js')}}"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.0.6/highcharts.js" charset="utf-8"></script>
<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
$("document").ready(function(){
setTimeout(function(){
$("div.alert").fadeOut(1000);
}, 2000 ); // 5 secs
});
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="{{asset('/image/logo.png')}}">
<title>POSTAG</title>
<!-- Bootstrap core CSS -->
<link href="{{asset('/css/bootstrap.min1.css')}}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{{asset('/css/simple-sidebar.css')}}" rel="stylesheet">
</head>
<body>
<div class="d-flex" id="wrapper">
<!-- Sidebar -->
<div class="border-right" id="sidebar-wrapper" style="background-color: #d7ebf4">
<div class="sidebar-heading"><img src="{{asset('/image/logo1.png')}}">POSTAG </div>
<div class="list-group list-group-flush" style="background-color: #d7ebf4">
<a href="{{route('user')}}" class="list-group-item list-group-item-action">Beranda</a>
<a href="{{route('fixxing')}}" class="list-group-item list-group-item-action">Memperbaiki Kalimat</a>
<a href="{{route('tagging')}}" class="list-group-item list-group-item-action ">Pelabelan Kata</a>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-light border-bottom" style="background-color: #d7ebf4">
<button class="btn btn-primary" id="menu-toggle">=</button>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#a" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Selamat datang,{{\Session::get('user')['nama']}}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{route('profile')}}">Profil</a>
<a class="dropdown-item" href="{{route('notifuser')}}">Notifikasi</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{route('logoutuser')}}">Keluar</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
@if($message = \Session::get('kosong'))
<div class="alert alert-danger alert-block">
<strong>{{$message}}</strong>
</div>
@endif
<div class="row mt-3">
<div class="col-md-12">
<center><img style="width: 300px" src="{{asset('/image/user.png')}}" alt=""></center>
</div>
<div class="col-md-12">
<br><br>
<center><h3 style="font-family: Georgia, 'Times New Roman', Times, serif">Nama : {{\Session::get('user')['nama']}}</h3 ></center>
</div>
<div class="col-md-12">
<center><h3 style="font-family: Georgia, 'Times New Roman', Times, serif">Username : {{\Session::get('user')['username']}}</h3></center>
</div>
<div class="col-md-12">
<center><h3 style="font-family: Georgia, 'Times New Roman', Times, serif">Email : {{\Session::get('user')['email']}}</h3></center>
</div>
<div class="col-md-12">
<center>
<h3 style="font-family: Georgia, 'Times New Roman', Times, serif">Reward :{{$reward->total}}
</h3 >
</center>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Bootstrap core JavaScript -->
<script src="{{asset('/js/jquery.min1.js')}}"></script>
<script src="{{asset('/js/bootstrap.bundle.min.js')}}"></script>
<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
$("document").ready(function(){
setTimeout(function(){
$("div.alert").fadeOut(1000);
}, 2000 ); // 5 secs
});
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="{{asset('/image/logo.png')}}">
<title>POSTAG</title>
<!-- Bootstrap core CSS -->
<link href="{{asset('/css/bootstrap.min1.css')}}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{{asset('/css/simple-sidebar.css')}}" rel="stylesheet">
</head>
@php($option = "")
<body>
<div class="d-flex" id="wrapper">
<!-- Sidebar -->
<div class="border-right" id="sidebar-wrapper" style="background-color: #d7ebf4">
<div class="sidebar-heading"><img src="{{asset('/image/logo1.png')}}">POSTAG </div>
<div class="list-group list-group-flush" style="background-color: #d7ebf4">
<a href="{{route('user')}}" class="list-group-item list-group-item-action">Beranda</a>
<a href="{{route('fixxing')}}" class="list-group-item list-group-item-action">Memperbaiki Kalimat</a>
<a href="{{route('tagging')}}" class="list-group-item list-group-item-action ">Pelabelan Kata</a>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-light border-bottom" style="background-color: #d7ebf4">
<button class="btn btn-primary" id="menu-toggle">=</button>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#a" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Selamat datang,{{\Session::get('user')['nama']}}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{route('profile')}}">Profil</a>
<a class="dropdown-item" href="#">Notifikasi</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{route('logoutuser')}}">Keluar</a>
</div>
</li>
</ul>
</div>
</nav>
<br>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<form action="{{route('cobalagi')}}" method="POST">
<input type="hidden" name="_token" value="{{csrf_token()}}">
@php($id = 0 )
@php($idtext = 0 )
@php($cat_id=0)
@foreach($pilih['news'] as $new)
@php($values = explode(chr(2),str_replace(array(' ',','),chr(2),$new->sentece)))
@foreach($values as $value)
{{-- @php() --}}
<input style="width: 100px;" type="hidden" name ="id[{{$id++}}]" value="{{$new->sentence_id}}">
<input style="width: 100px;" type="text" name ="new[{{$idtext++}}]" value="{{$value}}" readonly>
@endforeach
<br>
@for($l = 0; $l < count($values);$l++)
<select style="width: 100px;" name="kategori[{{$cat_id++}}]" id="">
<option value="1">Subjek</option>
<option value="2">Predikat</option>
<option value="3">Objek</option>
<option value="4">Keterangan</option>
</select>
@endfor
<br>
<hr>
@endforeach
<button type="submit" name="submit">Submit</button>
</form>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Bootstrap core JavaScript -->
<script src="{{asset('/js/jquery.min1.js')}}"></script>
<script src="{{asset('/js/bootstrap.bundle.min.js')}}"></script>
<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
$("document").ready(function(){
setTimeout(function(){
$("div.alert").fadeOut(1000);
}, 2000 ); // 5 secs
});
</script>
</body>
</html>
@if(!$model->container)
@include('charts::_partials.loader.container-top')
<div>
<canvas id="{{ $model->id }}"></canvas>
</div>
@include('charts::_partials.loader.container-bottom')
@endif
@if(!$model->container)
@include('charts::_partials.loader.container-top')
<div>
<canvas id="{{ $model->id }}" @include('charts::_partials.dimension.html')></canvas>
</div>
@include('charts::_partials.loader.container-bottom')
@endif
@if(!$model->container)
@include('charts::_partials.container.title')
@include('charts::_partials.loader.container-top')
<div id="{{ $model->id }}" style="@include('charts::_partials.dimension.css')" class="ct-chart ct-perfect-fourth"></div>
@include('charts::_partials.loader.container-bottom')
@endif
@if(!$model->container)
@include('charts::_partials.container.title')
@include('charts::_partials.loader.container-top')
<center>
<div id="{{ $model->id }}" style="@include('charts::_partials.dimension.css')"></div>
</center>
@include('charts::_partials.loader.container-bottom')
@endif
@if(!$model->container)
@include('charts::_partials.loader.container-top')
<div id="{{ $model->id }}" style="@include('charts::_partials.dimension.css')"></div>
@include('charts::_partials.loader.container-bottom')
@endif
@if(!$model->container)
@include('charts::_partials.loader.container-top')
<svg id="{{ $model->id }}" @include('charts::_partials.dimension.html')></svg>
@include('charts::_partials.loader.container-bottom')
@endif
@if(!$model->container)
<div>
@if($model->title)
<center>
<strong>{{ $model->title }}</strong>
</center>
@endif
</div>
@endif
@if($model->responsive)
height: 100%; width: 100%;
@else
@if($model->height)
height: {{ $model->height }}px;
@endif
@if($model->width)
width: {{ $model->width }}px;
@endif
@endif
@if($model->responsive)
height="100%" width="100%"
@else
@if($model->height)
height="{{ $model->height }}"
@endif
@if($model->width)
width="{{ $model->width }}"
@endif
@endif
@if($model->responsive)
height: "100%",
width: "100%",
@else
@if($model->height)
height: "{{ $model->height }}px",
@else
height: "100%",
@endif
@if($model->width)
width: "{{ $model->width }}px",
@else
width: "100%",
@endif
@endif
@if(!$model->responsive)
@if($model->height)
height: {{ $model->height }},
@endif
@if($model->width)
width: {{ $model->width }},
@endif
@endif
<style>
#{{ $model->id }} > svg {
@include("charts::_partials.dimension.css")
}
</style>
<script>
function hex2rgba_convert(hex,opacity){
hex = hex.replace('#','');
r = parseInt(hex.substring(0,2), 16);
g = parseInt(hex.substring(2,4), 16);
b = parseInt(hex.substring(4,6), 16);
result = 'rgba('+r+','+g+','+b+','+opacity/100+')';
return result;
}
</script>
<div class="charts" style="background: {{ $model->background_color }};">
<div data-duration="{{ $model->loader_duration }}" class="charts-loader {{ $model->loader ? 'enabled' : '' }}" style="display: none; position: relative; top: {{ ($model->height / 2) - 30 }}px; height: 0;">
<center>
<div class="loading-spinner" style="border: 3px solid {{ $model->loader_color }}; border-right-color: transparent;"></div>
</center>
</div>
<div class="charts-chart">
<style>
@-webkit-keyframes rotate-forever {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-moz-keyframes rotate-forever {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes rotate-forever {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.loading-spinner {
-webkit-animation-duration: 0.75s;
-moz-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-name: rotate-forever;
-moz-animation-name: rotate-forever;
animation-name: rotate-forever;
-webkit-animation-timing-function: linear;
-moz-animation-timing-function: linear;
animation-timing-function: linear;
height: 60px;
width: 60px;
border-radius: 50%;
display: inline-block;
}
</style>
<script>
$(function() {
$('.charts').each(function() {
var chart = $(this).find('.charts-chart');
var loader = $(this).find('.charts-loader');
var time = loader.data('duration');
if(loader.hasClass('enabled')) {
chart.css({visibility: 'hidden'});
loader.fadeIn(350);
setTimeout(function() {
loader.fadeOut(350, function() {
chart.css({opacity: 0, visibility: 'visible'}).animate({opacity: 1}, 350);
});
}, time)
}
});
})
</script>
@if(!$model->customId)
@include('charts::_partials.container.div')
@endif
<script>
var {{ $model->id }} = AmCharts.makeChart( "{{ $model->id }}", {
"type": "serial",
"theme": "light",
"dataProvider": [
@foreach($model->values as $v)
{
"country": "{{ $model->labels[$loop->index] }}",
"visits": {{ $v }}
},
@endforeach
],
"valueAxes": [
{
"minimum": 0,
"title": "{!! $model->element_label !!}",
}
],
"gridAboveGraphs": true,
"startDuration": 1,
"graphs": [ {
"balloonText": "[[category]]: <b>[[value]]</b>",
"fillAlphas": 0.8,
"lineAlpha": 0.2,
"type": "column",
"valueField": "{!! $model->element_label !!}"
} ],
"chartCursor": {
"categoryBalloonEnabled": false,
"cursorAlpha": 0,
"zoomable": false
},
"categoryField": "country",
"categoryAxis": {
"gridPosition": "start",
"gridAlpha": 0,
"tickPosition": "start",
"tickLength": 20
},
"export": {
"enabled": true
}
} );
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
["{!! $model->element_label !!}",@foreach($model->values as $value){{ $value }},@endforeach],
],
type: 'area',
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
["{!! $model->element_label !!}",@foreach($model->values as $value){{ $value }},@endforeach],
],
type: 'bar',
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
@for($i = 0; $i < count($model->labels); $i++)
["{!! $model->labels[$i] !!}", {{ $model->values[$i] }}],
@endfor
],
type: 'donut',
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
["{!! $model->element_label !!}",{{ $model->values[0] }}],
],
type: 'gauge',
},
gauge: {
min: {{ ($model->values && count($model->values) > 1) ? $model->values[1] : '0' }},
max: {{ ($model->values && count($model->values) > 2) ? $model->values[2] : '100' }},
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
["{!! $model->element_label !!}",@foreach($model->values as $value){{ $value }},@endforeach],
]
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
@foreach($model->datasets as $ds)
["{{ $ds['label'] }}",@foreach($ds['values'] as $value){{ $value }},@endforeach],
@endforeach
],
type: 'area',
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
@foreach($model->datasets as $ds)
["{{ $ds['label'] }}",@foreach($ds['values'] as $value){{ $value }},@endforeach],
@endforeach
],
type: 'bar',
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
@foreach($model->datasets as $ds)
["{{ $ds['label'] }}",@foreach($ds['values'] as $value){{ $value }},@endforeach],
@endforeach
]
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@include('charts::_partials.container.div')
<script>
var {{ $model->id }} = c3.generate({
bindto: '#{{ $model->id }}',
data: {
columns: [
@for($i = 0; $i < count($model->labels); $i++)
["{!! $model->labels[$i] !!}", {{ $model->values[$i] }}],
@endfor
],
type: 'pie',
},
axis: {
x: {
type: 'category',
categories: [@foreach($model->labels as $label)"{!! $label !!}",@endforeach]
},
y: {
label: {
text: "{!! $model->element_label !!}",
position: 'outer-middle',
}
},
},
@if($model->title)
title: {
text: "{!! $model->title !!}",
x: -20 //center
},
@endif
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas')
@endif
<script type="text/javascript">
var {{ $model->id }};
$(function (){
{{ $model->id }} = new RadialGauge({
renderTo: "{{ $model->id }}",
@if($model->colors)
colorNumbers: "{{ $model->colors[0] }}",
@endif
@include('charts::_partials.dimension.js2')
@if($model->title)
title: "{!! $model->title !!}",
@endif
value: {{ $model->values[0] }},
units: "{!! $model->element_label !!}",
@if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
@php($min = $model->values[1])
minValue: {{ $min }},
@else
@php($min = 0)
@endif
@if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
@php($max = $model->values[2])
maxValue: {{ $max }},
@else
@php($max = 100)
@endif
@php
$interval = 10;
$interval_adder = round($max / $interval, 2)
@endphp
majorTicks: [
@php($r = $min)
@for($i = 0; $i <= $interval; $i++)
@if($i == 0)
{{ $min }},
@elseif($i == $interval)
{{ $max }},
@else
{{ $r + $interval_adder }},
@php($r = $r + $interval_adder)
@endif
@endfor
],
animationRule: 'linear',
highlights: [
@if($model->gauge_style == 'right')
// Calculate warning area
<?php
$low_warning = round(0.40 * $max, 2);
$warning = round(0.25 * $max, 2);
$max_warning = round(0.10 * $max, 2);
?>
{ from: {{ $low_warning }}, to: {{ $max }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $warning }}, to: {{ $low_warning }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $max_warning }}, to: {{ $warning }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $min }}, to: {{ $max_warning }}, color: 'rgba(255,0,0,.5)' },
@elseif($model->gauge_style == 'center')
// Calculate warning area
<?php
$warning = round(0.10 * $max, 2);
$warning2 = round(0.25 * $max, 2);
$warning3 = round(0.40 * $max, 2);
$warning4 = round(0.60 * $max, 2);
$warning5 = round(0.75 * $max, 2);
$warning6 = round(0.90 * $max, 2);
?>
{ from: {{ $warning3 }}, to: {{ $warning4 }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $warning2 }}, to: {{ $warning3 }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning4 }}, to: {{ $warning5 }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning }}, to: {{ $warning2 }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $warning5 }}, to: {{ $warning6 }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $min }}, to: {{ $warning }}, color: 'rgba(255,0,0,.5)' },
{ from: {{ $warning6 }}, to: {{ $max }}, color: 'rgba(255,0,0,.5)' },
@else
// Calculate warning area
<?php
$low_warning = round(0.60 * $max, 2);
$warning = round(0.75 * $max, 2);
$max_warning = round(0.90 * $max, 2);
?>
{ from: {{ $min }}, to: {{ $low_warning }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $low_warning }}, to: {{ $warning }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning }}, to: {{ $max_warning }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $max_warning }}, to: {{ $max }}, color: 'rgba(255,0,0,.5)' },
@endif
],
}).draw()
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas')
@endif
<script type="text/javascript">
var {{ $model->id }};
$(function (){
{{ $model->id }} = new RadialGauge({
renderTo: "{{ $model->id }}",
@if($model->colors)
colorNumbers: "{{ $model->colors[0] }}",
@endif
@include('charts::_partials.dimension.js2')
@if($model->title)
title: "{!! $model->title !!}",
@endif
value: {{ $model->values ? $model->values[0] : '0' }},
units: "{!! $model->element_label !!}",
@if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
@php($min = $model->values[1])
minValue: {{ $min }},
@else
@php($min = 0)
@endif
@if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
@php($max = $model->values[2])
maxValue: {{ $max }},
@else
@php($max = 100)
@endif
@php
$interval = 10;
$interval_adder = round($max / $interval, 2)
@endphp
majorTicks: [
@php($r = $min)
@for($i = 0; $i <= $interval; $i++)
@if($i == 0)
{{ $min }},
@elseif($i == $interval)
{{ $max }},
@else
{{ $r + $interval_adder }},
@php($r = $r + $interval_adder)
@endif
@endfor
],
animationRule: 'linear',
highlights: [
@if($model->gauge_style == 'right')
// Calculate warning area
@php
$low_warning = round(0.40 * $max, 2);
$warning = round(0.25 * $max, 2);
$max_warning = round(0.10 * $max, 2);
@endphp
{ from: {{ $low_warning }}, to: {{ $max }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $warning }}, to: {{ $low_warning }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $max_warning }}, to: {{ $warning }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $min }}, to: {{ $max_warning }}, color: 'rgba(255,0,0,.5)' },
@elseif($model->gauge_style == 'center') {
// Calculate warning area
@php
$warning = round(0.10 * $max, 2);
$warning2 = round(0.25 * $max, 2);
$warning3 = round(0.40 * $max, 2);
$warning4 = round(0.60 * $max, 2);
$warning5 = round(0.75 * $max, 2);
$warning6 = round(0.90 * $max, 2);
@endphp
{ from: {{ $warning3 }}, to: {{ $warning4 }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $warning2 }}, to: {{ $warning3 }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning4 }}, to: {{ $warning5 }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning }}, to: {{ $warning2 }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $warning5 }}, to: {{ $warning6 }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $min }}, to: {{ $warning }}, color: 'rgba(255,0,0,.5)' },
{ from: {{ $warning6 }}, to: {{ $max }}, color: 'rgba(255,0,0,.5)' },
@else
// Calculate warning area
@php
$low_warning = round(0.60 * $max, 2);
$warning = round(0.75 * $max, 2);
$max_warning = round(0.90 * $max, 2);
@endphp
{ from: {{ $min }}, to: {{ $low_warning }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $low_warning }}, to: {{ $warning }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning }}, to: {{ $max_warning }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $max_warning }}, to: {{ $max }}, color: 'rgba(255,0,0,.5)' },
@endif
],
}).draw()
setInterval(function(){
$.getJSON("{!! $model->url !!}", function( data ) {
{{ $model->id }}.value = data["{{ $model->value_name }}"];
})
}, {{ $model->interval }})
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas')
@endif
<script type="text/javascript">
var {{ $model->id }};
$(function (){
{{ $model->id }} = new LinearGauge({
renderTo: "{{ $model->id }}",
@if($model->colors)
colorNumbers: "{{ $model->colors[0] }}",
@endif
@include('charts::_partials.dimension.js2')
@if($model->title)
title: "{!! $model->title !!}",
@endif
value: {{ $model->values ? $model->values[0] : '0' }},
units: "{!! $model->element_label !!}",
@if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
@php($min = $model->values[1])
minValue: {{ $min }},
@else
@php($min = 0)
@endif
@if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
@php($max = $model->values[2])
maxValue: {{ $max }},
@else
@php($max = 100)
@endif
// Calculate warning area
@php
$low_warning = round(0.60 * $max, 2);
$warning = round(0.75 * $max, 2);
$max_warning = round(0.90 * $max, 2);
$interval = 10;
$interval_adder = round($max / $interval, 2);
@endphp
majorTicks: [
@php($r = $min)
@for($i = 0; $i <= $interval; $i++)
@if($i == 0)
{{ $min }},
@elseif($i == $interval)
{{ $max }},
@else
{{ $r + $interval_adder }},
@php($r = $r + $interval_adder)
@endif
@endfor
],
highlights: [
@if($model->gauge_style == 'right')
// Calculate warning area
@php
$low_warning = round(0.40 * $max, 2);
$warning = round(0.25 * $max, 2);
$max_warning = round(0.10 * $max, 2);
@endphp
{ from: {{ $low_warning }}, to: {{ $max }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $warning }}, to: {{ $low_warning }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $max_warning }}, to: {{ $warning }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $min }}, to: {{ $max_warning }}, color: 'rgba(255,0,0,.5)' },
@elseif($model->gauge_style == 'center')
// Calculate warning area
@php
$warning = round(0.10 * $max, 2);
$warning2 = round(0.25 * $max, 2);
$warning3 = round(0.40 * $max, 2);
$warning4 = round(0.60 * $max, 2);
$warning5 = round(0.75 * $max, 2);
$warning6 = round(0.90 * $max, 2);
@endphp
{ from: {{ $warning3 }}, to: {{ $warning4 }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $warning2 }}, to: {{ $warning3 }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning4 }}, to: {{ $warning5 }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning }}, to: {{ $warning2 }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $warning5 }}, to: {{ $warning6 }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $min }}, to: {{ $warning }}, color: 'rgba(255,0,0,.5)' },
{ from: {{ $warning6 }}, to: {{ $max }}, color: 'rgba(255,0,0,.5)' },
@else
// Calculate warning area
@php
$low_warning = round(0.60 * $max, 2);
$warning = round(0.75 * $max, 2);
$max_warning = round(0.90 * $max, 2);
@endphp
{ from: {{ $min }}, to: {{ $low_warning }}, color: 'rgba(0,258,0,.15)' },
{ from: {{ $low_warning }}, to: {{ $warning }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning }}, to: {{ $max_warning }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $max_warning }}, to: {{ $max }}, color: 'rgba(255,0,0,.5)' },
@endif
],
}).draw()
setInterval(function(){
$.getJSON("{!! $model->url !!}", function( data ) {
{{ $model->id }}.value = data["{{ $model->value_name }}"];
})
}, {{ $model->interval }})
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas')
@endif
<script type="text/javascript">
var {{ $model->id }};
$(function (){
{{ $model->id }} = new LinearGauge({
renderTo: "{{ $model->id }}",
@if($model->colors)
colorNumbers: "{{ $model->colors[0] }}",
@endif
@include('charts::_partials.dimension.js2')
@if($model->title)
title: "{!! $model->title !!}",
@endif
value: "{{ $model->values[0] }}",
units: "{!! $model->element_label !!}",
@if(count($model->values) >= 2 and $model->values[1] <= $model->values[0])
@php($min = $model->values[1])
minValue: {{ $min }},
@else
@php($min = 0)
@endif
@if(count($model->values) >= 3 and $model->values[2] >= $model->values[0])
@php($max = $model->values[2])
maxValue: {{ $max }},
@else
@php($max = 100)
@endif
// Calculate warning area
@php
$low_warning = round(0.60 * $max, 2);
$warning = round(0.75 * $max, 2);
$max_warning = round(0.90 * $max, 2);
$interval = 10;
$interval_adder = round($max / $interval, 2);
@endphp
majorTicks: [
@php($r = $min)
@for($i = 0; $i <= $interval; $i++)
@if($i == 0)
{{ $min }},
@elseif($i == $interval)
{{ $max }},
@else
{{ $r + $interval_adder }},
@php($r = $r + $interval_adder)
@endif
@endfor
],
highlights: [
@if($model->gauge_style == 'right')
// Calculate warning area
@php
$low_warning = round(0.40 * $max, 2);
$warning = round(0.25 * $max, 2);
$max_warning = round(0.10 * $max, 2);
@endphp
{ from: {{ $low_warning }}, to: {{ $max }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $warning }}, to: {{ $low_warning }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $max_warning }}, to: {{ $warning }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $min }}, to: {{ $max_warning }}, color: 'rgba(255,0,0,.5)' },
@elseif($model->gauge_style == 'center')
// Calculate warning area
@php
$warning = round(0.10 * $max, 2);
$warning2 = round(0.25 * $max, 2);
$warning3 = round(0.40 * $max, 2);
$warning4 = round(0.60 * $max, 2);
$warning5 = round(0.75 * $max, 2);
$warning6 = round(0.90 * $max, 2);
@endphp
{ from: {{ $warning3 }}, to: {{ $warning4 }}, color: 'rgba(0,258,0,.20)' },
{ from: {{ $warning2 }}, to: {{ $warning3 }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning4 }}, to: {{ $warning5 }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning }}, to: {{ $warning2 }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $warning5 }}, to: {{ $warning6 }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $min }}, to: {{ $warning }}, color: 'rgba(255,0,0,.5)' },
{ from: {{ $warning6 }}, to: {{ $max }}, color: 'rgba(255,0,0,.5)' },
@else
// Calculate warning area
@php
$low_warning = round(0.60 * $max, 2);
$warning = round(0.75 * $max, 2);
$max_warning = round(0.90 * $max, 2);
@endphp
{ from: {{ $min }}, to: {{ $low_warning }}, color: 'rgba(0,258,0,.15)' },
{ from: {{ $low_warning }}, to: {{ $warning }}, color: 'rgba(255,255,0,.35)' },
{ from: {{ $warning }}, to: {{ $max_warning }}, color: 'rgba(255,69,0,.40)' },
{ from: {{ $max_warning }}, to: {{ $max }}, color: 'rgba(255,0,0,.5)' },
@endif
],
}).draw()
});
</script>
@include('charts::_partials.container.chartist')
<script type="text/javascript">
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
series: [
[
@foreach($model->values as $value)
"{{ $value }}",
@endforeach
],
]
};
var options = {
showArea: true,
@include('charts::_partials.dimension.js')
};
var {{ $model->id }} = new Chartist.Line('#{{ $model->id }}', data, options);
</script>
@include('charts::_partials.container.chartist')
<script type="text/javascript">
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
series: [
[
@foreach($model->values as $value)
"{{ $value }}",
@endforeach
],
]
};
var options = { @include('charts::_partials.dimension.js') }
var {{ $model->id }} = new Chartist.Bar('#{{ $model->id }}', data, options);
</script>
@include('charts::_partials.container.chartist')
<script type="text/javascript">
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
series: [
@foreach($model->values as $value)
"{{ $value }}",
@endforeach
]
};
var options = {
donut: true,
labelOffset: 50,
chartPadding: 20,
labelDirection: 'explode',
@include('charts::_partials.dimension.js')
};
var {{ $model->id }} = new Chartist.Pie('#{{ $model->id }}', data, options);
</script>
@include('charts::_partials.container.chartist')
<script type="text/javascript">
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
series: [
[
@foreach($model->values as $value)
{{ $value }},
@endforeach
],
]
};
var options = { @include('charts::_partials.dimension.js') }
var {{ $model->id }} = new Chartist.Line('#{{ $model->id }}', data, options);
</script>
@include('charts::_partials.container.chartist')
<script type="text/javascript">
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
series: [
@foreach($model->datasets as $ds)
[
@foreach($ds['values'] as $value)
"{{ $value }}",
@endforeach
],
@endforeach
]
};
var options = {
showArea: true,
@include('charts::_partials.dimension.js')
}
var {{ $model->id }} = new Chartist.Line('#{{ $model->id }}', data, options);
</script>
@include('charts::_partials.container.chartist')
<script type="text/javascript">
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
series: [
@foreach($model->datasets as $ds)
[
@foreach($ds['values'] as $value)
"{{ $value }}",
@endforeach
],
@endforeach
]
};
var options = { @include('charts::_partials.dimension.js') }
var {{ $model->id }} = new Chartist.Bar('#{{ $model->id }}', data, options);
</script>
@include('charts::_partials.container.chartist')
<script type="text/javascript">
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
series: [
@foreach($model->datasets as $ds)
[
@foreach($ds['values'] as $value)
"{{ $value }}",
@endforeach
],
@endforeach
]
};
var options = { @include('charts::_partials.dimension.js') }
var {{ $model->id }} = new Chartist.Line('#{{ $model->id }}', data, options);
</script>
@include('charts::_partials.container.chartist')
<script type="text/javascript">
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
series: [
@foreach($model->values as $value)
"{{ $value }}",
@endforeach
]
};
var options = {
chartPadding: 20,
labelDirection: 'explode',
@include('charts::_partials.dimension.js')
};
var {{ $model->id }} = new Chartist.Pie('#{{ $model->id }}', data, options);
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas2')
@endif
@include('charts::_partials.helpers.hex2rgb')
<script type="text/javascript">
var ctx = document.getElementById("{{ $model->id }}")
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
datasets: [{
fill: true,
@if($model->colors)
backgroundColor: hex2rgba_convert("{{ $model->colors[0] }}", 50),
@endif
label: "{!! $model->element_label !!}",
lineTension: 0.3,
@if($model->colors)
borderColor: "{{ $model->colors[0] }}",
@endif
data: [
@foreach($model->values as $dta)
{{ $dta }},
@endforeach
],
}]
};
var {{ $model->id }} = new Chart(ctx, {
type: 'line',
data: data,
options: {
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
maintainAspectRatio: false,
@if($model->title)
title: {
display: true,
text: "{!! $model->title !!}",
fontSize: 20,
}
@endif
}
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas2')
@endif
<script type="text/javascript">
var ctx = document.getElementById("{{ $model->id }}")
var {{ $model->id }} = new Chart(ctx, {
type: 'bar',
data: {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
datasets: [
{
label: "{!! $model->element_label !!}",
backgroundColor: [
@if($model->colors)
@foreach($model->colors as $color)
"{{ $color }}",
@endforeach
@else
@foreach($model->values as $dta)
"{{ sprintf('#%06X', mt_rand(0, 0xFFFFFF)) }}",
@endforeach
@endif
],
data: [
@foreach($model->values as $dta)
{{ $dta }},
@endforeach
],
}
]
},
options: {
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
maintainAspectRatio: false,
@if($model->title)
title: {
display: true,
text: "{!! $model->title !!}",
fontSize: 20,
},
@endif
scales: {
yAxes: [{
display: true,
ticks: {
beginAtZero: true,
}
}]
}
}
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas2')
@endif
<script type="text/javascript">
var ctx = document.getElementById("{{ $model->id }}")
var {{ $model->id }} = new Chart(ctx, {
type: 'doughnut',
data: {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
datasets: [{
data: [
@foreach($model->values as $dta)
{{ $dta }},
@endforeach
],
backgroundColor: [
@if($model->colors)
@foreach($model->colors as $color)
"{{ $color }}",
@endforeach
@else
@foreach($model->values as $dta)
"{{ sprintf('#%06X', mt_rand(0, 0xFFFFFF)) }}",
@endforeach
@endif
],
}]
},
options: {
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
maintainAspectRatio: false,
@if($model->title)
title: {
display: true,
text: "{!! $model->title !!}",
fontSize: 20,
}
@endif
}
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas2')
@endif
<script type="text/javascript">
var ctx = document.getElementById("{{ $model->id }}")
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
datasets: [
{
fill: false,
label: "{!! $model->element_label !!}",
lineTension: 0.3,
@if($model->colors)
borderColor: "{{ $model->colors[0] }}",
backgroundColor: "{{ $model->colors[0] }}",
@endif
data: [
@foreach($model->values as $dta)
{{ $dta }},
@endforeach
],
}
]
};
var {{ $model->id }} = new Chart(ctx, {
type: 'line',
data: data,
options: {
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
maintainAspectRatio: false,
@if($model->title)
title: {
display: true,
text: "{!! $model->title !!}",
fontSize: 20,
}
@endif
}
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas2')
@endif
@include('charts::_partials.helpers.hex2rgb')
<script type="text/javascript">
var ctx = document.getElementById("{{ $model->id }}")
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
datasets: [
@for ($i = 0; $i < count($model->datasets); $i++)
{
fill: true,
label: "{!! $model->datasets[$i]['label'] !!}",
lineTension: 0.3,
@if($model->colors and count($model->colors) > $i)
@php($c = $model->colors[$i])
@else
@php($c = sprintf('#%06X', mt_rand(0, 0xFFFFFF)))
@endif
borderColor: "{{ $c }}",
backgroundColor: hex2rgba_convert("{{ $c }}", 50),
data: [
@foreach($model->datasets[$i]['values'] as $dta)
{{ $dta }},
@endforeach
],
},
@endfor
]
};
var {{ $model->id }} = new Chart(ctx, {
type: 'line',
data: data,
options: {
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
maintainAspectRatio: false,
@if($model->title)
title: {
display: true,
text: "{!! $model->title !!}",
fontSize: 20,
}
@endif
}
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas2')
@endif
<script type="text/javascript">
var ctx = document.getElementById("{{ $model->id }}")
var {{ $model->id }} = new Chart(ctx, {
type: 'bar',
data: {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
datasets: [
@for ($i = 0; $i < count($model->datasets); $i++)
{
fill: true,
label: "{!! $model->datasets[$i]['label'] !!}",
lineTension: 0.3,
@if($model->colors and count($model->colors) > $i)
borderColor: "{{ $model->colors[$i] }}",
backgroundColor: "{{ $model->colors[$i] }}",
@else
$c = sprintf('#%06X', mt_rand(0, 0xFFFFFF))
borderColor: "{{ $c }}",
backgroundColor: "{{ $c }}",
@endif
data: [
@foreach($model->datasets[$i]['values'] as $dta)
{{ $dta }},
@endforeach
],
},
@endfor
]
},
options: {
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
maintainAspectRatio: false,
@if($model->title)
title: {
display: true,
text: "{!! $model->title !!}",
fontSize: 20,
},
@endif
scales: {
yAxes: [{
display: true,
ticks: {
beginAtZero: true,
}
}]
}
}
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas2')
@endif
<script type="text/javascript">
var ctx = document.getElementById("{{ $model->id }}")
var data = {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
datasets: [
@for ($i = 0; $i < count($model->datasets); $i++)
{
fill: false,
label: "{!! $model->datasets[$i]['label'] !!}",
lineTension: 0.3,
@if($model->colors and count($model->colors) > $i)
@php($c = $model->colors[$i])
@else
@php($c = sprintf('#%06X', mt_rand(0, 0xFFFFFF)))
@endif
borderColor: "{{ $c }}",
backgroundColor: "{{ $c }}",
data: [
@foreach($model->datasets[$i]['values'] as $dta)
{{ $dta }},
@endforeach
],
},
@endfor
]
};
var myLineChart = new Chart(ctx, {
type: 'line',
data: data,
options: {
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
maintainAspectRatio: false,
@if($model->title)
title: {
display: true,
text: "{!! $model->title !!}",
fontSize: 20,
}
@endif
}
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.canvas2')
@endif
<script type="text/javascript">
var ctx = document.getElementById("{{ $model->id }}")
var {{ $model->id }} = new Chart(ctx, {
type: 'pie',
data: {
labels: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
],
datasets: [{
data: [
@foreach($model->values as $dta)
{{ $dta }},
@endforeach
],
backgroundColor: [
@if($model->colors)
@foreach($model->colors as $color)
"{{ $color }}",
@endforeach
@else
@foreach($model->values as $dta)
"{{ sprintf('#%06X', mt_rand(0, 0xFFFFFF)) }}",
@endforeach
@endif
],
}]
},
options: {
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
maintainAspectRatio: false,
@if($model->title)
title: {
display: true,
text: "{!! $model->title !!}",
fontSize: 20,
}
@endif
}
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.div')
@endif
<script type="text/javascript">
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
{{ $model->id }}.setOption({
title: {
text: "{!! $model->title !!}"
},
tooltip: {},
toolbox: {
right: 30,
feature: {
@if ($model->export)
saveAsImage: {
title: 'Save as image',
}
@endif
}
},
legend: {
data:["{!! $model->element_label !!}"]
},
xAxis: {
data: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
]
},
yAxis: {},
@if (count($model->colors) > 0)
color: ["{{ $model->colors[0] }}"],
@endif
@if ($model->background_color)
backgroundColor: "{{ $model->background_color }}",
@endif
series: [{
name: "{!! $model->element_label !!}",
type: 'line',
areaStyle: {
normal: {
color: "{{ count($model->colors) > 0 ? $model->colors[0] : '#c23531' }}",
}
},
data: [
@foreach($model->values as $dta)
{{ $dta }},
@endforeach
],
animationDelay: function (idx) {
return idx * 100;
}
}],
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.div')
@endif
<script type="text/javascript">
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
{{ $model->id }}.setOption({
title: {
text: "{!! $model->title !!}"
},
tooltip: {},
toolbox: {
right: 30,
feature: {
@if ($model->export)
saveAsImage: {
title: 'Save as image',
}
@endif
}
},
legend: {
data:["{!! $model->element_label !!}"]
},
xAxis: {
data: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
]
},
yAxis: {},
@if (count($model->colors) > 0)
color: ["{{ $model->colors[0] }}"],
@endif
@if ($model->background_color)
backgroundColor: "{{ $model->background_color }}",
@endif
series: [{
name: "{!! $model->element_label !!}",
type: 'bar',
data: [
@foreach($model->values as $dta)
{{ $dta }},
@endforeach
],
animationDelay: function (idx) {
return idx * 100;
}
}],
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.div')
@endif
<script type="text/javascript">
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
{{ $model->id }}.setOption({
title: {
text: "{!! $model->title !!}"
},
tooltip: {},
toolbox: {
right: 30,
feature: {
@if ($model->export)
saveAsImage: {
title: 'Save as image',
}
@endif
}
},
legend: {
orient: 'vertical',
top: 50,
data: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
]
},
@if (count($model->colors) > 0)
color: [
@foreach ($model->colors as $color)
"{{ $color }}",
@endforeach
],
@endif
@if ($model->background_color)
backgroundColor: "{{ $model->background_color }}",
@endif
series: [{
name: "{!! $model->element_label !!}",
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
data: [
@for($i = 0; count($model->values) > $i; $i++)
{value: {{ $model->values[$i] }}, name: "{{ $model->labels[$i] }}" },
@endfor
],
animationDelay: function (idx) {
return idx * 100;
}
}],
});
</script>
@if(!$model->customId)
@include('charts::_partials.container.div')
@endif
<script type="text/javascript">
var {{ $model->id }} = echarts.init(document.getElementById("{{ $model->id }}"));
{{ $model->id }}.setOption({
title: {
text: "{!! $model->title !!}"
},
tooltip: {},
toolbox: {
right: 30,
feature: {
@if ($model->export)
saveAsImage: {
title: 'Save as image',
}
@endif
}
},
legend: {
orient: 'vertical',
top: 50,
data: [
@foreach($model->labels as $label)
"{!! $label !!}",
@endforeach
]
},
@if (count($model->colors) > 0)
color: [
@foreach ($model->colors as $color)
"{{ $color }}",
@endforeach
],
@endif
@if ($model->background_color)
backgroundColor: "{{ $model->background_color }}",
@endif
series: [{
name: "{!! $model->title !!}",
type: 'gauge',
min: {{ ($model->values && count($model->values) > 1) ? $model->values[1] : '0' }},
max: {{ ($model->values && count($model->values) > 2) ? $model->values[2] : '100' }},
data: [
{
value: {{ $model->values[0] }},
name: "{!! $model->element_label !!}",
}
],
animationDelay: function (idx) {
return idx * 100;
}
}],
});
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment