Browse Source

bar events component

gohary 5 years ago
parent
commit
63b3e572e6

+ 0 - 0
src/app/dashboard/bar-events/add-bar-event/add-bar-event.component.css


+ 3 - 0
src/app/dashboard/bar-events/add-bar-event/add-bar-event.component.html

@@ -0,0 +1,3 @@
+<p>
+  add-bar-event works!
+</p>

+ 15 - 0
src/app/dashboard/bar-events/add-bar-event/add-bar-event.component.ts

@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-add-bar-event',
+  templateUrl: './add-bar-event.component.html',
+  styleUrls: ['./add-bar-event.component.css']
+})
+export class AddBarEventComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}

+ 0 - 0
src/app/dashboard/bar-events/bar-events-list/bar-events-list.component.css


+ 91 - 0
src/app/dashboard/bar-events/bar-events-list/bar-events-list.component.html

@@ -0,0 +1,91 @@
+<div class="container">
+
+  <div class="row">
+    <div class="col-12">
+      <ul class="list-unstyled titileLi-w">
+        <li class="headingText-w">خدمة إدارة الصفحة الخارجية > </li>
+        <li class="headingText-w activeLi-w" style="margin-right:5px">إدارة شريط الأحداث </li>
+      </ul>
+    </div>
+  </div>
+
+
+  <div class="row">
+    <div class="col-12 col-sm-12 col-md-6 col-lg-6">
+      <button type="button" class="btn btn-outline-success butttonCreate dashButton-w" (click)="onAdd()" *ngIf="authSer.showAddBtn"><i class="fas fa-plus marginFontAowsome-w"></i>إنشاء جديد</button>
+      <button type="button" class="btn btn-outline-danger butttonDelete dashButton-w" (click)="onDelete()" *ngIf="authSer.showDeleteBtn"><i class="fas fa-times marginFontAowsome-w"></i>حذف</button>
+    </div>
+    <div class="col-12 col-sm-12 col-md-6 col-lg-6">
+      <div class="form-group">
+        <input type="text" placeholder="البحث" class="form-control inputSearchTable-w" style="margin-top:13px;" (input)="filtterFunc($event)"/>
+        <hr>
+      </div>
+    </div>
+  </div>
+
+  <div class="containerContent-w">
+    <div class="row">
+      <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+        <div class="form-group">
+          <span class="spanSelect-w">
+            <select [ngModel]="dataTableNumber" class="form-control selectButton-w" (input)="onGetValue($event)">
+              <option value="5">5</option>
+              <option value="10">10</option>
+              <option value="15">15</option>
+              <option value="20">20</option>
+            </select>
+            من العناصر يتم عرضها
+          </span>
+        </div>
+      </div>
+      <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+
+      </div>
+    </div>
+
+    <table class="table table-bordered">
+      <thead class="headBackground-w">
+        <tr>
+          <th>
+            <div class="custom-control custom-checkbox">
+              <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
+              <label class="custom-control-label fixedWidthLabel-w checkAll-w" for="customCheck" style="margin-bottom:20px; cursor: pointer;"></label>
+            </div>
+          </th>
+          <th>الاسم</th>
+          <th>الترتيب</th>
+          <th>موقع العرض</th>
+          <th>النوع</th>
+          <th *ngIf="authSer.showEditBtn">تعديل</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr *ngFor="let event of eventsList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index ">
+          <td>
+            <div class="custom-control custom-checkbox centerIneerItem">
+              <input type="checkbox" class="custom-control-input" id="{{event.id}}" [(ngModel)]="event.selected" [value]='event' (change)="checkIfAllSelected();">
+              <label class="custom-control-label disblayBlock-w" for="{{event.id}}" style="color:#2a2a2a;cursor: pointer;"></label>
+            </div>
+          </td>
+          <td>{{event.name}}</td>
+          <td>
+            {{event.ranking}}
+            <!-- <select class="form-control" [ngModel]="event.ranking" (change)="changeRanking($event, event.id)">
+            <option value="1">1</option>
+            <option value="2">2</option>
+            <option value="3">3</option>
+            <option value="4">4</option>
+            <option value="5">5</option>
+            <option value="6">6</option>
+          </select> -->
+        </td>
+        <td>{{event.display_location == 'both' ? 'كلاهما' : event.display_location == 'internal' ? 'الصفحه الداخليه' : event.display_location == 'external' ? 'الصفحه الخارجيه' : 'No'}}</td>
+        <td>{{event.type == '0' ? 'التعازي' : event.type == '1' ? 'التهاني' : 'No'}}</td>
+        <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(event.id)"><i class="fas fa-edit"></i></button></td>
+      </tr>
+    </tbody>
+  </table>
+  <pagination-controls nextLabel="التالي" previousLabel="السابق" (pageChange)="onPageChange($event)"></pagination-controls>
+</div>
+
+</div>

+ 30 - 0
src/app/dashboard/bar-events/bar-events-list/bar-events-list.component.ts

@@ -0,0 +1,30 @@
+import { Component, OnInit } from '@angular/core';
+import {DashboardService} from "../../../shared/dashboard.service";
+
+@Component({
+  selector: 'app-bar-events-list',
+  templateUrl: './bar-events-list.component.html',
+  styleUrls: ['./bar-events-list.component.css']
+})
+export class BarEventsListComponent implements OnInit {
+  barEventsList = [];
+  pageId: number;
+  // advertisimentsListIds = [];
+  count: number;
+  perPagePagenation: number;
+  currentPage:number = 1;
+  // filtterStatus = '';
+  selectedAll: any;
+  userLoginId:number;
+  serviceId:number;
+  dataTableNumber: number = 5;
+
+  constructor(
+    private dashboardService: DashboardService,
+  ) { }
+
+  ngOnInit() {
+
+  }
+
+}

+ 6 - 2
src/app/dashboard/dashboard.module.ts

@@ -78,6 +78,8 @@ import { RoleReportComponent } from './roles/role-report/role-report.component';
 import { ReportListComponent } from './report-list/report-list.component';
 import { ReportListComponent } from './report-list/report-list.component';
 
 
 import { UserService } from '../shared/user.service';
 import { UserService } from '../shared/user.service';
+import { BarEventsListComponent } from './bar-events/bar-events-list/bar-events-list.component';
+import { AddBarEventComponent } from './bar-events/add-bar-event/add-bar-event.component';
 
 
 
 
 
 
@@ -92,7 +94,7 @@ import { UserService } from '../shared/user.service';
         RolesListComponent,
         RolesListComponent,
         AddRolesComponent,
         AddRolesComponent,
         DepartmentListComponent,
         DepartmentListComponent,
-        AddDepartmentComponent,
+        AddDepartmentComponent,dashboard
         SectionListComponent,
         SectionListComponent,
         AddSectionComponent,
         AddSectionComponent,
         UserPermissionComponent,
         UserPermissionComponent,
@@ -129,6 +131,8 @@ import { UserService } from '../shared/user.service';
         AdvertisimentComponent,
         AdvertisimentComponent,
         AddAdverComponent,
         AddAdverComponent,
         NumberDerictiveDirective,
         NumberDerictiveDirective,
+        BarEventsListComponent,
+        AddBarEventComponent,
     ],
     ],
     imports: [
     imports: [
         CommonModule,
         CommonModule,
@@ -156,7 +160,7 @@ import { UserService } from '../shared/user.service';
         ExternalSerService,
         ExternalSerService,
         AchievementsService,
         AchievementsService,
         InternalSerService,
         InternalSerService,
-        DashboardService, 
+        DashboardService,
     ],
     ],
 })
 })
 
 

src/app/dashboard/external-services/add-external/add-external.component.css → src/app/dashboard/footer/external-services/add-external/add-external.component.css


src/app/dashboard/external-services/add-external/add-external.component.html → src/app/dashboard/footer/external-services/add-external/add-external.component.html


src/app/dashboard/external-services/add-external/add-external.component.ts → src/app/dashboard/footer/external-services/add-external/add-external.component.ts


src/app/dashboard/external-services/external-list/external-list.component.css → src/app/dashboard/footer/external-services/external-list/external-list.component.css


src/app/dashboard/external-services/external-list/external-list.component.html → src/app/dashboard/footer/external-services/external-list/external-list.component.html


src/app/dashboard/external-services/external-list/external-list.component.ts → src/app/dashboard/footer/external-services/external-list/external-list.component.ts