mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
edit recurrence event
This commit is contained in:
Generated
+11
@@ -133,6 +133,7 @@
|
|||||||
"crypto-js": "^4.0.0",
|
"crypto-js": "^4.0.0",
|
||||||
"date-fns": "^2.17.0",
|
"date-fns": "^2.17.0",
|
||||||
"depd": "^2.0.0",
|
"depd": "^2.0.0",
|
||||||
|
"dexie": "^4.0.7",
|
||||||
"dompurify": "^3.0.6",
|
"dompurify": "^3.0.6",
|
||||||
"dotenv": "^10.0.0",
|
"dotenv": "^10.0.0",
|
||||||
"duration": "^0.2.2",
|
"duration": "^0.2.2",
|
||||||
@@ -14664,6 +14665,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1094867.tgz",
|
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1094867.tgz",
|
||||||
"integrity": "sha512-pmMDBKiRVjh0uKK6CT1WqZmM3hBVSgD+N2MrgyV1uNizAZMw4tx6i/RTc+/uCsKSCmg0xXx7arCP/OFcIwTsiQ=="
|
"integrity": "sha512-pmMDBKiRVjh0uKK6CT1WqZmM3hBVSgD+N2MrgyV1uNizAZMw4tx6i/RTc+/uCsKSCmg0xXx7arCP/OFcIwTsiQ=="
|
||||||
},
|
},
|
||||||
|
"node_modules/dexie": {
|
||||||
|
"version": "4.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/dexie/-/dexie-4.0.7.tgz",
|
||||||
|
"integrity": "sha512-M+Lo6rk4pekIfrc2T0o2tvVJwL6EAAM/B78DNfb8aaxFVoI1f8/rz5KTxuAnApkwqTSuxx7T5t0RKH7qprapGg=="
|
||||||
|
},
|
||||||
"node_modules/di": {
|
"node_modules/di": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz",
|
||||||
@@ -54872,6 +54878,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1094867.tgz",
|
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1094867.tgz",
|
||||||
"integrity": "sha512-pmMDBKiRVjh0uKK6CT1WqZmM3hBVSgD+N2MrgyV1uNizAZMw4tx6i/RTc+/uCsKSCmg0xXx7arCP/OFcIwTsiQ=="
|
"integrity": "sha512-pmMDBKiRVjh0uKK6CT1WqZmM3hBVSgD+N2MrgyV1uNizAZMw4tx6i/RTc+/uCsKSCmg0xXx7arCP/OFcIwTsiQ=="
|
||||||
},
|
},
|
||||||
|
"dexie": {
|
||||||
|
"version": "4.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/dexie/-/dexie-4.0.7.tgz",
|
||||||
|
"integrity": "sha512-M+Lo6rk4pekIfrc2T0o2tvVJwL6EAAM/B78DNfb8aaxFVoI1f8/rz5KTxuAnApkwqTSuxx7T5t0RKH7qprapGg=="
|
||||||
|
},
|
||||||
"di": {
|
"di": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz",
|
||||||
|
|||||||
@@ -149,6 +149,7 @@
|
|||||||
"crypto-js": "^4.0.0",
|
"crypto-js": "^4.0.0",
|
||||||
"date-fns": "^2.17.0",
|
"date-fns": "^2.17.0",
|
||||||
"depd": "^2.0.0",
|
"depd": "^2.0.0",
|
||||||
|
"dexie": "^4.0.7",
|
||||||
"dompurify": "^3.0.6",
|
"dompurify": "^3.0.6",
|
||||||
"dotenv": "^10.0.0",
|
"dotenv": "^10.0.0",
|
||||||
"duration": "^0.2.2",
|
"duration": "^0.2.2",
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ export class SearchList {
|
|||||||
Id: string;
|
Id: string;
|
||||||
appName?: string;
|
appName?: string;
|
||||||
ApplicationName: string;
|
ApplicationName: string;
|
||||||
|
docId: number;
|
||||||
|
subject: string;
|
||||||
|
applicationId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SearchList_v2 {
|
export class SearchList_v2 {
|
||||||
|
|||||||
@@ -170,12 +170,12 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if(!this.postEvent.IsRecurring) {
|
if (!this.postEvent.IsRecurring) {
|
||||||
this.postEvent.EventRecurrence.frequency = 'never'
|
this.postEvent.EventRecurrence.frequency = 'never'
|
||||||
} else {
|
} else {
|
||||||
this.postEvent.EventRecurrence.frequency = this.utils.recurenceTypeSeleted(this.postEvent.EventRecurrence.frequency)
|
this.postEvent.EventRecurrence.frequency = this.utils.recurenceTypeSeleted(this.postEvent.EventRecurrence.frequency)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(this.postEvent?.Attachments)
|
console.log(this.postEvent?.Attachments)
|
||||||
console.log(this.loadedEventAttachments)
|
console.log(this.loadedEventAttachments)
|
||||||
window.onresize = (event) => {
|
window.onresize = (event) => {
|
||||||
@@ -377,11 +377,25 @@ export class EditEventPage implements OnInit {
|
|||||||
this.alertController.create({
|
this.alertController.create({
|
||||||
header: 'Editar evento?',
|
header: 'Editar evento?',
|
||||||
message: 'Este evento tem recorrência, deseja editar a Sequência de eventos?',
|
message: 'Este evento tem recorrência, deseja editar a Sequência de eventos?',
|
||||||
|
inputs: [
|
||||||
|
{
|
||||||
|
name: 'confirm',
|
||||||
|
type: 'checkbox',
|
||||||
|
label: '',
|
||||||
|
value: 'confirm',
|
||||||
|
checked: false
|
||||||
|
}
|
||||||
|
],
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: 'Sim',
|
text: 'Sim',
|
||||||
handler: () => {
|
handler: (data) => {
|
||||||
this.save_v2(true)
|
// Check if the checkbox is checked
|
||||||
|
if (data.includes('confirm')) {
|
||||||
|
this.save_v2(true)
|
||||||
|
} else {
|
||||||
|
this.save_v2(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -165,9 +165,10 @@ export class SearchPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async view(item: SearchList) {
|
async view(item: SearchList) {
|
||||||
|
console.log('doc item',item)
|
||||||
|
|
||||||
const ApplicationType = item.ApplicationType.toString()
|
const ApplicationType = item.applicationId.toString()
|
||||||
const Id = item.Id
|
const Id = item.docId
|
||||||
|
|
||||||
if (ApplicationType == '8') {
|
if (ApplicationType == '8') {
|
||||||
|
|
||||||
@@ -178,12 +179,12 @@ export class SearchPage implements OnInit {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
trustedUrl: '',
|
trustedUrl: '',
|
||||||
file: {
|
file: {
|
||||||
title: item.Assunto,
|
title: item.subject,
|
||||||
url: '',
|
url: '',
|
||||||
title_link: '',
|
title_link: '',
|
||||||
},
|
},
|
||||||
applicationId: ApplicationType,
|
applicationId: ApplicationType,
|
||||||
docId: item.Id,
|
docId: item.docId,
|
||||||
},
|
},
|
||||||
cssClass: 'modal-width-100-width-background modal'
|
cssClass: 'modal-width-100-width-background modal'
|
||||||
});
|
});
|
||||||
@@ -196,12 +197,12 @@ export class SearchPage implements OnInit {
|
|||||||
componentProps: {
|
componentProps: {
|
||||||
trustedUrl: '',
|
trustedUrl: '',
|
||||||
file: {
|
file: {
|
||||||
title: item.Assunto,
|
title: item.subject,
|
||||||
url: '',
|
url: '',
|
||||||
title_link: '',
|
title_link: '',
|
||||||
},
|
},
|
||||||
applicationId: ApplicationType,
|
applicationId: ApplicationType,
|
||||||
docId: item.Id,
|
docId: item.docId,
|
||||||
},
|
},
|
||||||
cssClass: 'modal-width-100-width-background modal'
|
cssClass: 'modal-width-100-width-background modal'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -428,7 +428,7 @@
|
|||||||
<ion-footer class="ion-no-border">
|
<ion-footer class="ion-no-border">
|
||||||
<ion-toolbar class="width-100 d-flex justify-space-between px-20">
|
<ion-toolbar class="width-100 d-flex justify-space-between px-20">
|
||||||
<ion-buttons slot="start">
|
<ion-buttons slot="start">
|
||||||
<button class="btn-ok" fill="clear" color="#fff" (click)="save_v2()">
|
<button class="btn-ok" fill="clear" color="#fff" (click)="validationEditAllEvent()">
|
||||||
<ion-label>Gravar</ion-label>
|
<ion-label>Gravar</ion-label>
|
||||||
</button>
|
</button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|||||||
@@ -353,7 +353,48 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async save_v2() {
|
validationEditAllEvent() {
|
||||||
|
if (this.postEvent.IsRecurring) {
|
||||||
|
this.alertController.create({
|
||||||
|
header: 'Editar evento?',
|
||||||
|
message: 'Este evento tem recorrência, deseja editar a Sequência de eventos?',
|
||||||
|
inputs: [
|
||||||
|
{
|
||||||
|
name: 'confirm',
|
||||||
|
type: 'checkbox',
|
||||||
|
label: '',
|
||||||
|
value: 'confirm',
|
||||||
|
checked: false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: 'Sim',
|
||||||
|
handler: (data) => {
|
||||||
|
// Check if the checkbox is checked
|
||||||
|
if (data.includes('confirm')) {
|
||||||
|
this.save_v2(true)
|
||||||
|
} else {
|
||||||
|
this.save_v2(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Não',
|
||||||
|
handler: () => {
|
||||||
|
this.save_v2(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}).then(res => {
|
||||||
|
res.present();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.save_v2(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async save_v2(editAllEvent) {
|
||||||
this.injectValidation()
|
this.injectValidation()
|
||||||
this.runValidation()
|
this.runValidation()
|
||||||
|
|
||||||
@@ -366,7 +407,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
this.agendaDataRepository.updateEvent(this._postEvent.EventId, this._postEvent,false).subscribe((value) => {
|
this.agendaDataRepository.updateEvent(this._postEvent.EventId, this._postEvent,editAllEvent).subscribe((value) => {
|
||||||
console.log(value)
|
console.log(value)
|
||||||
}, ((error) => {
|
}, ((error) => {
|
||||||
console.log('edit event error: ', error)
|
console.log('edit event error: ', error)
|
||||||
|
|||||||
Reference in New Issue
Block a user