This commit is contained in:
Peter Maquiran
2023-01-20 14:57:50 +01:00
parent 61d142fa13
commit a203566b3e
24 changed files with 545 additions and 308 deletions
+6 -1
View File
@@ -249,7 +249,8 @@ const routes = [
{
path: 'chat-debugging',
loadChildren: () => import('./shared/popover/chat-debugging/chat-debugging.module').then( m => m.ChatDebuggingPageModule)
},
},
{
path: 'chat-message-debugging',
loadChildren: () => import('./shared/popover/chat-message-debugging/chat-message-debugging.module').then( m => m.ChatMessageDebuggingPageModule)
},
@@ -260,6 +261,10 @@ const routes = [
{
path: 'information',
loadChildren: () => import('./modals/information/information.module').then( m => m.InformationPageModule)
},
{
path: 'chat-options-popover',
loadChildren:() => import('./shared/popover/chat-options-popover/chat-options-popover.module').then( m => m.ChatOptionsPopoverPageModule)
}
@@ -171,7 +171,7 @@
[(ngModel)]="postData.StartDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -207,7 +207,7 @@
[(ngModel)]="postData.EndDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -52,7 +52,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
public minDate = new Date();
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
p: any = {}
@@ -132,8 +132,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
}
setDefaultTime() {
this.postData.StartDate = new Date()
this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
// this.postData.StartDate = new Date()
// this.postData.EndDate = (new Date(new Date().getTime() + 15 * 60000))
}
close() {
@@ -384,4 +384,46 @@ export class DocumentSetUpMeetingPage implements OnInit {
this.taskParticipantsCc = data;
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
// console.log("AFTER IF MINUTES: " +m);
// console.log("AFTER HOURS: " +h);
return timeToReturn;
}
setStartDate(){
this.postData.StartDate = this.roundTimeQuarterHour();
}
setEndDate(){
this.postData.EndDate = this.postData.StartDate;
}
}
@@ -147,7 +147,7 @@
[min]="minDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -186,7 +186,7 @@
[min]="endMinDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -59,7 +59,7 @@ export class BookMeetingModalPage implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
@@ -481,4 +481,46 @@ export class BookMeetingModalPage implements OnInit {
this.taskParticipantsCc = data;
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
// console.log("AFTER IF MINUTES: " +m);
// console.log("AFTER HOURS: " +h);
return timeToReturn;
}
setStartDate(){
this.postData.StartDate = this.roundTimeQuarterHour();
}
setEndDate(){
this.postData.EndDate = this.postData.StartDate;
}
}
@@ -25,7 +25,7 @@ export class EditActionPage implements OnInit {
public minDate = new Date().toISOString()
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -44,7 +44,7 @@
[formControl]="dateControlStart"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -83,7 +83,7 @@
[min]="endMinDate"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -46,7 +46,7 @@ export class NewActionPage implements OnInit {
public minDate = new Date().toISOString()
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -171,4 +171,42 @@ export class NewActionPage implements OnInit {
this.modalController.dismiss();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m) {
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
return timeToReturn;
}
setStartDate(){
this.dateControlStart = new FormControl(moment(this.roundTimeQuarterHour()));
}
setEndDate(){
this.dateControlEnd = this.dateControlStart;
}
}
@@ -44,7 +44,7 @@ export class NewPublicationPage implements OnInit {
public minDate = new Date().toISOString().slice(0, 10)
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public color: ThemePalette = 'primary';
+11 -4
View File
@@ -27,19 +27,19 @@
<div class="btn-modal-dismiss" *ngIf="showSearchInput">
<button class="btn-no-color" (click)="close()">
<ion-icon c*ngIf="ThemeService.currentTheme == 'default' " lass="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "class="icon" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</button>
</div>
</div>
<!-- Search drop down -->
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1" >
<ion-form [class.d-none]="!showSearchInput">
<div class="d-flex search-input-container ion-justify-content-between" >
<div class="icon">
<button class="btn-no-color" (click)="basicSearch()">
<ion-icon class="icon-z" slot="end" name="search"></ion-icon>
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</button>
</div>
<div class="input-text d-flex ion-align-items-center">
@@ -102,7 +102,14 @@
<div class="container ">
<div class="d-flex overflow-x-auto">
<!-- SLIDE -->
<div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': category.Active}" class="button cursor-pointer" (click)="filterDocList(category.Name)" (click)="activeCategoty(i)">
<div class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': TodosCategory}" class="button cursor-pointer" (click)="noFilter()">
<span>Todos</span>
<ion-label class="label">{{ searchDocuments.length }}</ion-label>
</div>
<div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': category.Active}" class="button cursor-pointer" (click)="activeCategoty(i); filterDocList(category.Name)">
<span>{{ category.Name }}</span>
<ion-label class="label">{{ category.Qtd }}</ion-label>
+22
View File
@@ -704,6 +704,7 @@ export class SearchPage implements OnInit {
}
TodosCategory = true
async filterDocList(categoryName:string){
// show all category
@@ -716,6 +717,27 @@ export class SearchPage implements OnInit {
}
this.showCategory = categoryName;
for(let category of this.searchCategories) {
if(category['Active']) {
this.TodosCategory = false
return false
}
}
this.TodosCategory = true
}
noFilter() {
this.TodosCategory = true
let n = 0
for(let category of this.searchCategories) {
this.searchCategories[n]['Active'] = false
n++
}
this.showSearchDocuments = this.searchDocuments;
}
+3 -3
View File
@@ -324,9 +324,9 @@ export class ChatSystemService {
console.log(subscription)
}))
// this.RochetChatConnectorService.subStreamNotifyUser().then((subscription=>{
// console.log(subscription)
// }))
this.RochetChatConnectorService.subStreamMessageUser().then((subscription => {
console.log(subscription)
}))
}
/**
@@ -466,6 +466,34 @@ export class RochetChatConnectorService {
}
subStreamMessageUser(param?: any) {
const requestId = uuidv4()
let message = {
msg: "sub",
id: requestId,
name: "stream-notify-user",
params:[
`${SessionStore.user.ChatData.data.userId}/message`,
param
]
}
this.ws.send({message, requestId})
return new Promise((resolve, reject) => {
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
if(message.id == requestId ) { // same request send
resolve(message)
return true
}
}})
});
}
receiveStreamNotifyRoom(funx: Function) {
this.ws.registerCallback({
@@ -45,7 +45,7 @@ export class EditEventToApprovePage implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -47,7 +47,7 @@ export class EditEventToApproveComponent implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
recurringTypes: any;
selectedRecurringType: any;
@@ -11,7 +11,8 @@
<button (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
<button (click)="addDocGestaoDocumental()" class="btn-ok" shape="round" >Gestão Documental</button>
<div class="solid"></div>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access]) == true " (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button>
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
</div>
@@ -25,7 +25,7 @@ export class EditActionPage implements OnInit {
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
public maxDate: any;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
@@ -47,7 +47,7 @@
[(ngModel)]="folder.DateBegin"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" (click)="setStartDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -83,7 +83,7 @@
[(ngModel)]="folder.DateEnd"
[disabled]="disabled"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="picker2"></mat-datepicker-toggle>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="picker2" (click)="setEndDate()"></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker2
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
@@ -23,7 +23,7 @@ export class NewActionPage implements OnInit {
public touchUi = false;
public enableMeridian = false;
public stepHour = 1;
public stepMinute = 5;
public stepMinute = 15;
public stepSecond = 5;
currentDate = new Date();
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
@@ -144,4 +144,45 @@ export class NewActionPage implements OnInit {
this.closeDesktopComponent.emit();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
var m = (Math.round(minutes/15) * 15) % 60;
var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours;
if (m == 0) {
if(minutes > m){
m = m + 15;
}
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else{
if(minutes > m){
m = m + 15;
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}else {
timeToReturn.setHours(h);
timeToReturn.setMinutes(m);
}
}
// console.log("AFTER IF MINUTES: " +m);
// console.log("AFTER HOURS: " +h);
return timeToReturn;
}
setStartDate(){
this.dateControlStart = new FormControl(moment(this.roundTimeQuarterHour()));
}
setEndDate(){
this.dateControlEnd = this.dateControlStart;
}
}
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon s-ion-icon" viewBox="0 0 512 512"><title>Search</title><path d="M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"></path></svg>

After

Width:  |  Height:  |  Size: 408 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon s-ion-icon" viewBox="0 0 512 512"><title>Search</title><path d="M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"></path></svg>

After

Width:  |  Height:  |  Size: 408 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon s-ion-icon" viewBox="0 0 512 512"><title>Search</title><path d="M456.69 421.39L362.6 327.3a173.81 173.81 0 0034.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 00327.3 362.6l94.09 94.09a25 25 0 0035.3-35.3zM97.92 222.72a124.8 124.8 0 11124.8 124.8 124.95 124.95 0 01-124.8-124.8z"></path></svg>

After

Width:  |  Height:  |  Size: 408 B

+8
View File
@@ -1419,3 +1419,11 @@ $font-size: 11pt;
}
.mat-form-field {
width: 100%;
}
ngx-mat-datetime-content button.mat-stroked-button {
top: -56px;
margin-bottom: -35px;
}
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = {
"shortSHA": "9c6f92038",
"SHA": "9c6f92038e6e7c00dfb6e2bd21bfd833120d7a99",
"shortSHA": "61d142fa1",
"SHA": "61d142fa13d63aa6dd3ef308224f162110504458",
"branch": "no_bug_movemente",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Thu Jan 19 13:03:28 2023 +0100'",
"lastCommitMessage": "improve",
"lastCommitNumber": "4669",
"lastCommitTime": "'Thu Jan 19 14:17:42 2023 +0100'",
"lastCommitMessage": "Message",
"lastCommitNumber": "4670",
"change": "",
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/chat/group-messages/group-messages.page.html\n\tmodified: src/app/pages/chat/messages/messages.page.html\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.html\n\tmodified: src/app/shared/chat/messages/messages.page.html",
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/app-routing.module.ts\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts\n\tmodified: src/app/pages/publications/edit-action/edit-action.page.ts\n\tmodified: src/app/pages/publications/new-action/new-action.page.html\n\tmodified: src/app/pages/publications/new-action/new-action.page.ts\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.ts\n\tmodified: src/app/pages/search/search.page.html\n\tmodified: src/app/pages/search/search.page.ts\n\tmodified: src/app/services/chat/chat-system.service.ts\n\tmodified: src/app/services/chat/rochet-chat-connector.service.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts\n\tmodified: src/app/shared/popover/chat-options-popover/chat-options-popover.page.html\n\tmodified: src/app/shared/publication/edit-action/edit-action.page.ts\n\tmodified: src/app/shared/publication/new-action/new-action.page.html\n\tmodified: src/app/shared/publication/new-action/new-action.page.ts\n\tnew file: src/assets/images/theme/blue/search.svg\n\tnew file: src/assets/images/theme/gov/search.svg\n\tnew file: src/assets/images/theme/tribunal/search.svg\n\tmodified: src/global.scss",
"changeAuthor": "peter.maquiran"
}