fix history
This commit is contained in:
@@ -11,33 +11,67 @@
|
||||
|
||||
<ion-content>
|
||||
<div class="boxed_contents">
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
Select Report
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<div style="padding: 10px; font-size: 14px; font-weight: bolder;">
|
||||
Select Activity
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start" *ngFor="let item of historyTypes;">
|
||||
<ion-button (click)="refreshHxReport(item)">{{item.ty}}</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-select label="Select Report"
|
||||
[(ngModel)]="slected_report_type"
|
||||
label-placement="stacked">
|
||||
<ion-select-option *ngFor="let item of historyTypes;" value="{{item.id}}">{{item.ty}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-col>
|
||||
<ion-col style="max-width: 150px;">
|
||||
<ion-button
|
||||
(click)="refreshReport()"
|
||||
expand="block"
|
||||
size="small">
|
||||
Refresh
|
||||
</ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<!-- <ion-buttons slot="end">-->
|
||||
<!-- <ion-button>End</ion-button>-->
|
||||
<!-- </ion-buttons>-->
|
||||
</ion-toolbar>
|
||||
|
||||
<app-history-completed-jobs *ngIf="current_report==='COMPLETED_JOBS';"></app-history-completed-jobs>
|
||||
<!-- <ion-grid>-->
|
||||
<!-- <ion-row>-->
|
||||
<!-- <ion-col>-->
|
||||
<!-- Select Report-->
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
|
||||
<!-- <ion-row>-->
|
||||
<!-- <ion-col>-->
|
||||
<!-- <ion-select label="Select Report"-->
|
||||
<!-- [(ngModel)]="slected_report_type"-->
|
||||
<!-- label-placement="stacked">-->
|
||||
<!-- <ion-select-option *ngFor="let item of historyTypes;" value="{{item.id}}">{{item.ty}}</ion-select-option>-->
|
||||
<!-- </ion-select>-->
|
||||
<!-- </ion-col>-->
|
||||
<!-- <ion-col style="max-width: 150px;">-->
|
||||
<!-- <ion-button-->
|
||||
<!-- (click)="refreshReport()"-->
|
||||
<!-- expand="block"-->
|
||||
<!-- size="small">-->
|
||||
<!-- Refresh-->
|
||||
<!-- </ion-button>-->
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
<!-- </ion-grid>-->
|
||||
|
||||
<div class="lesson" style="padding: 10px;">
|
||||
<div class="video" *ngFor="let item of current_report;" >
|
||||
<div class="left">
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url('+session_image_server+'/'+curr_session+'/job/'+item.origin_job_uid+')'"></div>
|
||||
<div class="text">
|
||||
<ion-label class="bold_text"> {{item.title}}</ion-label>
|
||||
<ion-label class="grey_text">{{item.description}}</ion-label>
|
||||
<div class="grey_text" [innerHTML]="item.job_description"></div>
|
||||
<!-- <ion-label class="grey_text">10 mins</ion-label>-->
|
||||
<ion-label class="due_date">Completed : {{item.delivery_date |date}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="right">-->
|
||||
<!-- <!– <ion-icon name="lock-closed-outline"></ion-icon>–>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <app-history-completed-jobs *ngIf="current_report==='COMPLETED_JOBS';"></app-history-completed-jobs>-->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
|
||||
ion-content {
|
||||
.back_image {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
.back {
|
||||
font-size: 25px;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
ion-icon {
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
|
||||
.bg_text {
|
||||
color: var(--ion-color-primary);
|
||||
background: #dfe1f3;
|
||||
font-size: 12px;
|
||||
padding: 2px 5px;
|
||||
border-radius: 5px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.rate {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.review {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.color_text {
|
||||
margin-top: 10px;
|
||||
font-size: 22px;
|
||||
font-family: 'semi-bold';
|
||||
color: var(--ion-color-primary);
|
||||
}
|
||||
|
||||
.items {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid lightgrey;
|
||||
padding-bottom: 10px;
|
||||
|
||||
.stud {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
ion-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
ion-label {
|
||||
color: grey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.about {
|
||||
margin-top: 10px;
|
||||
|
||||
.head_text {
|
||||
font-size: 18px;
|
||||
font-family: 'semi-bold';
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mentor {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
|
||||
.men_image {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-family: 'semi-bold';
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
color: grey;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.lesson {
|
||||
margin-top: 20px;
|
||||
|
||||
.bold {
|
||||
font-family: 'semi-bold';
|
||||
}
|
||||
|
||||
.color {
|
||||
color: var(--ion-color-primary);
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.sec {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.video {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: white;
|
||||
padding: 15px;
|
||||
box-shadow: 0px 0px 20px 1px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 10px;
|
||||
margin-top: 20px;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.men_image {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.bold_text {
|
||||
font-size: 16px;
|
||||
font-family: 'bold';
|
||||
}
|
||||
|
||||
.grey_text {
|
||||
font-size: 14px;
|
||||
color: grey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.review_tab {
|
||||
margin-top: 20px;
|
||||
|
||||
.total {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.star-rate {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.bold {
|
||||
font-size: 17px;
|
||||
font-family: 'semi-bold';
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.color {
|
||||
color: var(--ion-color-primary);
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.story-item {
|
||||
overflow: scroll;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 20px;
|
||||
|
||||
.menu {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.item {
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
ion-thumbnail {
|
||||
border-radius: 15px;
|
||||
width: max-content;
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
--border-radius: 50%;
|
||||
}
|
||||
|
||||
ion-label {
|
||||
font-size: 14px;
|
||||
font-family: "medium";
|
||||
color: var(--ion-color-medium);
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid var(--ion-color-primary);
|
||||
border-radius: 20px;
|
||||
padding: 2px 15px;
|
||||
margin-right: 10px;
|
||||
|
||||
.rate_num {
|
||||
margin-left: 5px;
|
||||
color: var(--ion-color-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.show {
|
||||
background-color: var(--ion-color-primary);
|
||||
}
|
||||
|
||||
.white {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.choice {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.reviw_list {
|
||||
margin-top: 25px;
|
||||
|
||||
.profile {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.men_image {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
|
||||
.bold {
|
||||
font-family: 'semi-bold';
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid var(--ion-color-primary);
|
||||
border-radius: 20px;
|
||||
padding: 2px 15px;
|
||||
margin-right: 10px;
|
||||
|
||||
.rate_num {
|
||||
margin-left: 5px;
|
||||
color: var(--ion-color-primary);
|
||||
}
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.like {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
|
||||
.heart {
|
||||
font-size: 25px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.count {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.bold_text {
|
||||
font-size: 20px;
|
||||
font-family: 'bold';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ion-footer {
|
||||
--background: white;
|
||||
|
||||
ion-toolbar {
|
||||
--border-width: 0px;
|
||||
padding: 10px;
|
||||
align-items: center;
|
||||
|
||||
ion-icon {
|
||||
color: white;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.button {
|
||||
background-color: var(--ion-color-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
border-radius: 30px;
|
||||
padding: 12px 0;
|
||||
|
||||
.text {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ import {WrenchService} from "../../services/wrench.service";
|
||||
})
|
||||
export class HistoryPage implements OnInit {
|
||||
@ViewChild('slected_report_type') slected_report_type;
|
||||
|
||||
session_image_server:string='';
|
||||
curr_session:string='';
|
||||
historyTypes:any=[];
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
@@ -19,6 +20,8 @@ historyTypes:any=[];
|
||||
private wrenchService: WrenchService,
|
||||
) {
|
||||
this.historyTypes= this.sessionDataProviderService.history_types;
|
||||
this.session_image_server = this.sessionDataProviderService.session_image_server;
|
||||
this.curr_session=this.sessionDataProviderService.session;
|
||||
}
|
||||
|
||||
current_report:string = '';
|
||||
@@ -27,6 +30,37 @@ historyTypes:any=[];
|
||||
|
||||
//alert(this.slected_report_type);
|
||||
}
|
||||
|
||||
usrData: {
|
||||
action: number;
|
||||
member_id: number;
|
||||
uid: string;
|
||||
sessionid: string;
|
||||
limit: 20;
|
||||
page: 1;
|
||||
offset: 0;
|
||||
};
|
||||
historyTotalData:any;
|
||||
refreshHxReport(item){
|
||||
|
||||
this.usrData = {
|
||||
action: 100001,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
limit: 20,
|
||||
page: 1,
|
||||
offset: 0,
|
||||
};
|
||||
|
||||
this.wrenchService
|
||||
.getHistoryReport(this.usrData, "contracthx")
|
||||
.subscribe((historyTotalData) => {
|
||||
this.historyTotalData = historyTotalData;
|
||||
console.log("HX RETURN->", this.historyTotalData);
|
||||
this.current_report = this.historyTotalData.result_list;
|
||||
});
|
||||
}
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +200,10 @@ export class WrenchService {
|
||||
getFamilyList(usrData) {
|
||||
return this.getPostData("familylist", usrData);
|
||||
}
|
||||
|
||||
getHistoryReport(usrData, hxtype) {
|
||||
return this.getPostData(hxtype, usrData);
|
||||
}
|
||||
getFamilyPeningList(usrData) {
|
||||
return this.getPostData("familywaitingtasks", usrData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user