This commit is contained in:
Peter Maquiran
2023-02-06 18:48:50 +01:00
parent 2d0f23749c
commit 43634e86ec
4 changed files with 22 additions and 24 deletions
@@ -64,6 +64,7 @@
placeholder="Data de fim*"
[formControl]="dateControlEnd"
[disabled]="disabled"
[min]="dateControlStart.value"
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" ></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
@@ -48,8 +48,8 @@ export class NewActionPage implements OnInit {
public stepHour = 1;
public stepMinute = 15;
public stepSecond = 5;
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
public dateControlStart
public dateControlEnd
currentDate = new Date();
showLoader = false
@@ -72,11 +72,9 @@ export class NewActionPage implements OnInit {
this.folder = new PublicationFolder();
this.dateControlStart = new FormControl(moment(new Date()));
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
this.dateControlStart = new FormControl(this.roundTimeQuarterHour());
this.dateControlEnd = new FormControl(this.dateControlStart.value);
// this.dateControlStart.value = new Date().toISOString()
// this.dateControlEnd.value = (new Date(new Date().getTime() + 15 * 60000)).toISOString()
}
@@ -140,11 +138,11 @@ export class NewActionPage implements OnInit {
try {
await this.publication.CreatePublicationFolder(this.folder).toPromise();
this.toastService.successMessage("Ação presidencial criado");
this.toastService._successMessage("Acção criada");
this.close();
} catch (error) {
this.toastService.badRequest("Ação presidencial não criado");
this.toastService._badRequest("Acção não criada");
} finally {
loader.remove()
}
@@ -179,11 +177,4 @@ export class NewActionPage implements OnInit {
return date
}
setStartDate(){
this.dateControlStart = new FormControl(moment(this.roundTimeQuarterHour() as any));
}
setEndDate(){
this.dateControlEnd = this.dateControlStart;
}
}
+9 -3
View File
@@ -172,9 +172,13 @@ export class RoomService {
this.members = members
this.membersExcludeMe = membersExcludeMe
this.calDateDuration()
this.restoreMessageFromDB()
this.calDateDuration();
(async () => {
await this.restoreMessageFromDB()
await this.loadHistory({})
})()
if(this.customFields?.countDownDate) {
this.countDownDate(this.customFields.countDownDate);
}
@@ -746,6 +750,8 @@ export class RoomService {
}
}
this.hasLoadHistory = true
const chatHistory: chatHistory = await this.RochetChatConnectorService.loadHistory(this.id, limit)
if(chatHistory?.result?.messages) {
@@ -756,6 +762,7 @@ export class RoomService {
for(let message of chatHistory.result.messages.reverse()) {
if (!messagesId.includes(message._id)) {
message.origin = 'history'
message.from = 'History'
const messagesToSave = await this.prepareMessageCreateIfNotExist({message: message});
if(messagesToSave != null) {
@@ -776,7 +783,6 @@ export class RoomService {
this.scrollDown()
}, 50)
this.hasLoadHistory = true
}
}
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = {
"shortSHA": "3fd2803a3",
"SHA": "3fd2803a3b3d92fdbcf66863b580d74e6e284b69",
"shortSHA": "2d0f23749",
"SHA": "2d0f23749c63c3599eb3bed52d82f44746588edb",
"branch": "no_bug_movemente",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Mon Feb 6 17:54:06 2023 +0100'",
"lastCommitMessage": "time",
"lastCommitNumber": "4741",
"lastCommitTime": "'Mon Feb 6 17:58:02 2023 +0100'",
"lastCommitMessage": "fix merge",
"lastCommitNumber": "4744",
"change": "",
"changeStatus": "On branch no_bug_movemente\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts\n\tmodified: src/app/shared/agenda/new-event/new-event.page.ts\n\tmodified: src/app/shared/popover/request-options/request-options.page.html\n\tmodified: src/app/shared/popover/request-options/request-options.page.ts",
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\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/services/chat/room.service.ts",
"changeAuthor": "peter.maquiran"
}