mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
publcation moved getfromDB
This commit is contained in:
@@ -816,7 +816,9 @@ export class ChatPage implements OnInit {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss();
|
modal.onDidDismiss().then(() =>{
|
||||||
|
this.ChatSystemService.currentRoom.roomLeave()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
async openOptions() {
|
async openOptions() {
|
||||||
const modal = await this.popoverController.create({
|
const modal = await this.popoverController.create({
|
||||||
component: ChatPopoverPage,
|
component: ChatPopoverPage,
|
||||||
cssClass: 'chat-popover',
|
cssClass: 'popover-bottom',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
roomId: this.roomId,
|
roomId: this.roomId,
|
||||||
members: this.members,
|
members: this.members,
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export class PublicationsPage implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.hideRefreshButton();
|
this.hideRefreshButton();
|
||||||
this.getFromDB()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,6 +167,8 @@ export class PublicationsPage implements OnInit {
|
|||||||
|
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
this.getFromDB()
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,16 +52,12 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
private httpErroHandle: HttpErrorHandle,
|
private httpErroHandle: HttpErrorHandle,
|
||||||
private storage: Storage,) {
|
private storage: Storage,) {
|
||||||
|
|
||||||
if(!this.publicationList[this.folderId]) {
|
this.createPublicationList()
|
||||||
this.publicationList[this.folderId] = []
|
|
||||||
this.publicationItem[this.folderId] = new PublicationFolder();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.getFromDB();
|
this.getFromDB();
|
||||||
|
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
|
|
||||||
|
|
||||||
if (params["params"]) {
|
if (params["params"]) {
|
||||||
this.folderId = params["params"].folderId;
|
this.folderId = params["params"].folderId;
|
||||||
//
|
//
|
||||||
@@ -77,11 +73,7 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
this.folderId = this.folderId['ProcessId']
|
this.folderId = this.folderId['ProcessId']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.createPublicationList()
|
||||||
if(!this.publicationList[this.folderId]) {
|
|
||||||
this.publicationList[this.folderId] = []
|
|
||||||
this.publicationItem[this.folderId] = new PublicationFolder();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.getFromDB();
|
this.getFromDB();
|
||||||
//this.testForkJoin()
|
//this.testForkJoin()
|
||||||
@@ -96,7 +88,6 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
//this.testForkJoin()
|
//this.testForkJoin()
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges() {
|
ngOnChanges() {
|
||||||
@@ -105,14 +96,21 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
this.folderId = this.folderId['ProcessId']
|
this.folderId = this.folderId['ProcessId']
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.publicationList[this.folderId]) {
|
this.createPublicationList()
|
||||||
this.publicationList[this.folderId] = []
|
|
||||||
this.publicationItem[this.folderId] = new PublicationFolder();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.getFromDB();
|
this.getFromDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
createPublicationList(folderId = this.folderId) {
|
||||||
|
if(!this.publicationList[folderId]) {
|
||||||
|
this.publicationList[folderId] = []
|
||||||
|
}
|
||||||
|
if(!this.publicationItem[folderId]) {
|
||||||
|
this.publicationItem[folderId] = new PublicationFolder();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
doRefresh = (event) => {
|
doRefresh = (event) => {
|
||||||
//setTimeout(() => {
|
//setTimeout(() => {
|
||||||
//this.testForkJoin()
|
//this.testForkJoin()
|
||||||
@@ -165,18 +163,22 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
const publicationIds = await this.publications.GetPublicationsList(folderId).toPromise();
|
const publicationIds = await this.publications.GetPublicationsList(folderId).toPromise();
|
||||||
|
|
||||||
|
this.createPublicationList(folderId)
|
||||||
|
let loadLater = []
|
||||||
for (let publicationId of publicationIds) {
|
for (let publicationId of publicationIds) {
|
||||||
let Publication = await this.publications.GetPublicationById(publicationId).toPromise();
|
|
||||||
let publicationDetails: Publication = this.publicationPipe.itemList(Publication)
|
|
||||||
|
|
||||||
const found = this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
if(!this.publicationIsPresent(publicationId, folderId)) {
|
||||||
|
await this.loadPublication(publicationId, folderId)
|
||||||
|
|
||||||
if(!found) {
|
} else {
|
||||||
PublicationModel.create(publicationDetails)
|
loadLater.push(publicationId)
|
||||||
this.publicationList[folderId].push(publicationDetails)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for( let publicationId of loadLater) {
|
||||||
|
await this.loadPublication(publicationId, folderId)
|
||||||
|
}
|
||||||
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|
||||||
this.storage.set(folderId, this.publicationList[folderId]);
|
this.storage.set(folderId, this.publicationList[folderId]);
|
||||||
@@ -187,6 +189,30 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publicationIsPresent(publicationId, folderId) {
|
||||||
|
return this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||||
|
}
|
||||||
|
publicationFind(publicationId, folderId) {
|
||||||
|
return this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||||
|
}
|
||||||
|
publicationFindIndex(publicationId, folderId) {
|
||||||
|
return this.publicationList[folderId].findIndex( e => e.DocumentId == publicationId )
|
||||||
|
}
|
||||||
|
|
||||||
|
async loadPublication(publicationId, folderId) {
|
||||||
|
let Publication = await this.publications.GetPublicationById(publicationId).toPromise();
|
||||||
|
let publicationDetails: Publication = this.publicationPipe.itemList(Publication)
|
||||||
|
|
||||||
|
const findIndex = this.publicationFindIndex(publicationId, folderId)
|
||||||
|
const found = this.publicationIsPresent(publicationId, folderId)
|
||||||
|
if(!found) {
|
||||||
|
this.publicationList[folderId].push(publicationDetails)
|
||||||
|
} else {
|
||||||
|
this.publicationList[folderId][findIndex] = publicationDetails
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
async AddPublication(publicationType: any, folderId: any) {
|
async AddPublication(publicationType: any, folderId: any) {
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: NewPublicationPage,
|
component: NewPublicationPage,
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
enterAnimation,
|
enterAnimation,
|
||||||
leaveAnimation,
|
leaveAnimation,
|
||||||
component: ChatPopoverPage,
|
component: ChatPopoverPage,
|
||||||
cssClass: 'model profile-modal search-submodal chat-aside',
|
cssClass: 'model search-submodal chat-option-aside',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
roomId: this.roomId,
|
roomId: this.roomId,
|
||||||
members: this.members,
|
members: this.members,
|
||||||
|
|||||||
@@ -43,10 +43,8 @@ export class ChatPopoverPage implements OnInit {
|
|||||||
close(action:any){
|
close(action:any){
|
||||||
if( window.innerWidth < 701){
|
if( window.innerWidth < 701){
|
||||||
this.popoverController.dismiss(action);
|
this.popoverController.dismiss(action);
|
||||||
this.modalController.dismiss(action)
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.popoverController.dismiss(action);
|
|
||||||
this.modalController.dismiss(action)
|
this.modalController.dismiss(action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,25 +125,16 @@ export class ChatPopoverPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.popoverController.dismiss('delete');
|
this.close('delete');
|
||||||
this.modalController.dismiss('delete')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openChangeGroupName(){
|
async openChangeGroupName(){
|
||||||
if( window.innerWidth < 701){
|
this.close('edit');
|
||||||
this.popoverController.dismiss('edit');
|
|
||||||
this.modalController.dismiss('edit')
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
this.popoverController.dismiss('edit');
|
|
||||||
this.modalController.dismiss('edit')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async addUser() {
|
async addUser() {
|
||||||
this.popoverController.dismiss('addUser');
|
this.close('addUser');
|
||||||
this.modalController.dismiss('addUser')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,10 +48,7 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
public p:PermissionService,
|
public p:PermissionService,
|
||||||
private httpErrorHandle: HttpErrorHandle
|
private httpErrorHandle: HttpErrorHandle
|
||||||
) {
|
) {
|
||||||
if(!this.publicationList[this.folderId]) {
|
this.createPublicationList()
|
||||||
this.publicationList[this.folderId] = []
|
|
||||||
this.publicationItem[this.folderId] = new PublicationFolder();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -59,10 +56,7 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
this.folderId = this.folderId['ProcessId']
|
this.folderId = this.folderId['ProcessId']
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.publicationList[this.folderId]) {
|
this.createPublicationList()
|
||||||
this.publicationList[this.folderId] = []
|
|
||||||
this.publicationItem[this.folderId] = new PublicationFolder();
|
|
||||||
}
|
|
||||||
|
|
||||||
window['app-view-publications-page-doRefresh'] = this.doRefresh
|
window['app-view-publications-page-doRefresh'] = this.doRefresh
|
||||||
|
|
||||||
@@ -76,10 +70,11 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!this.publicationList[this.folderId]) {
|
if(!this.publicationList[this.folderId]) {
|
||||||
this.publicationList[this.folderId] = []
|
|
||||||
this.publicationItem[this.folderId] = new PublicationFolder();
|
this.publicationItem[this.folderId] = new PublicationFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.createPublicationList()
|
||||||
|
|
||||||
this.getFromDB();
|
this.getFromDB();
|
||||||
|
|
||||||
this.getPublicationDetail();
|
this.getPublicationDetail();
|
||||||
@@ -88,6 +83,17 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
createPublicationList(folderId = this.folderId) {
|
||||||
|
if(!this.publicationList[this.folderId]) {
|
||||||
|
this.publicationList[this.folderId] = []
|
||||||
|
}
|
||||||
|
if(!this.publicationItem[this.folderId]) {
|
||||||
|
this.publicationItem[this.folderId] = new PublicationFolder();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
doRefresh =(event) => {
|
doRefresh =(event) => {
|
||||||
|
|
||||||
this.getPublicationDetail();
|
this.getPublicationDetail();
|
||||||
@@ -119,18 +125,22 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
try {
|
try {
|
||||||
const publicationIds = await this.publications.GetPublicationsList(folderId).toPromise();
|
const publicationIds = await this.publications.GetPublicationsList(folderId).toPromise();
|
||||||
|
|
||||||
|
this.createPublicationList(folderId)
|
||||||
|
let loadLater = []
|
||||||
for (let publicationId of publicationIds) {
|
for (let publicationId of publicationIds) {
|
||||||
let Publication = await this.publications.GetPublicationById(publicationId).toPromise();
|
|
||||||
let publicationDetails: Publication = this.publicationPipe.itemList(Publication)
|
|
||||||
|
|
||||||
const found = this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
if(!this.publicationIsPresent(publicationId, folderId)) {
|
||||||
|
await this.loadPublication(publicationId, folderId)
|
||||||
|
|
||||||
if(!found) {
|
} else {
|
||||||
/* PublicationModel.create(publicationDetails) */
|
loadLater.push(publicationId)
|
||||||
this.publicationList[folderId].push(publicationDetails)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for( let publicationId of loadLater) {
|
||||||
|
await this.loadPublication(publicationId, folderId)
|
||||||
|
}
|
||||||
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
|
|
||||||
this.storage.set(folderId, this.publicationList[folderId]);
|
this.storage.set(folderId, this.publicationList[folderId]);
|
||||||
@@ -139,6 +149,29 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
publicationIsPresent(publicationId, folderId) {
|
||||||
|
return this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||||
|
}
|
||||||
|
publicationFind(publicationId, folderId) {
|
||||||
|
return this.publicationList[folderId].find( e => e.DocumentId == publicationId )
|
||||||
|
}
|
||||||
|
publicationFindIndex(publicationId, folderId) {
|
||||||
|
return this.publicationList[folderId].findIndex( e => e.DocumentId == publicationId )
|
||||||
|
}
|
||||||
|
|
||||||
|
async loadPublication(publicationId, folderId) {
|
||||||
|
let Publication = await this.publications.GetPublicationById(publicationId).toPromise();
|
||||||
|
let publicationDetails: Publication = this.publicationPipe.itemList(Publication)
|
||||||
|
|
||||||
|
const findIndex = this.publicationFindIndex(publicationId, folderId)
|
||||||
|
const found = this.publicationIsPresent(publicationId, folderId)
|
||||||
|
if(!found) {
|
||||||
|
this.publicationList[folderId].push(publicationDetails)
|
||||||
|
} else {
|
||||||
|
this.publicationList[folderId][findIndex] = publicationDetails
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ import { oaprProd } from './suport/oapr'
|
|||||||
import { doneITProd } from './suport/doneIt'
|
import { doneITProd } from './suport/doneIt'
|
||||||
|
|
||||||
|
|
||||||
export const environment: Environment = oaprProd;
|
export const environment: Environment = doneITProd;
|
||||||
@@ -3,4 +3,4 @@ import { oaprDev } from './suport/oapr'
|
|||||||
import { doneITDev } from './suport/doneIt'
|
import { doneITDev } from './suport/doneIt'
|
||||||
|
|
||||||
|
|
||||||
export const environment: Environment = oaprDev;
|
export const environment: Environment = doneITDev;
|
||||||
@@ -348,6 +348,32 @@ $app-theme: mat-light-theme(
|
|||||||
right: 0 !important;
|
right: 0 !important;
|
||||||
top: unset !important;
|
top: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popover-bottom::part(content), .popover-bottom .popover-content {
|
||||||
|
top: unset !important;
|
||||||
|
bottom: 0px;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
left: 0px !important;
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-option-aside::part(content), .chat-option-aside .modal-wrapper{
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
height: 90%;
|
||||||
|
max-width: 100%;
|
||||||
|
top: -40px;
|
||||||
|
border-radius: 0 0 25px 25px;
|
||||||
|
-webkit-border-radius: 0 0 25px 25px;
|
||||||
|
-moz-border-radius: 0 0 25px 25px;
|
||||||
|
-ms-border-radius: 0 0 25px 25px;
|
||||||
|
-o-border-radius: 0 0 25px 25px;
|
||||||
|
max-width: 400px;
|
||||||
|
width: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.exp-options .popover-content {
|
.exp-options .popover-content {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "52745817e",
|
"shortSHA": "2a4a22c1d",
|
||||||
"SHA": "52745817ef92023bca3b7e78d8e2090dfca9d9bd",
|
"SHA": "2a4a22c1d59ec83d01d2fe500140cbc6dffd5dfc",
|
||||||
"branch": "no_bug_movemente",
|
"branch": "no_bug_movemente",
|
||||||
"lastCommitAuthor": "'Eudes Inácio'",
|
"lastCommitAuthor": "'Eudes Inácio'",
|
||||||
"lastCommitTime": "'Fri Mar 10 09:11:13 2023 +0100'",
|
"lastCommitTime": "'Fri Mar 10 14:45:12 2023 +0100'",
|
||||||
"lastCommitMessage": "pull made 09:11_10/03/23",
|
"lastCommitMessage": "enviroment changed",
|
||||||
"lastCommitNumber": "4863",
|
"lastCommitNumber": "4864",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch no_bug_movemente\nYour branch is behind 'origin/no_bug_movemente' by 3 commits, and can be fast-forwarded.\n (use \"git pull\" to update your local branch)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/environments/environment.prod.ts\n\tmodified: src/environments/environment.ts",
|
"changeStatus": "On branch no_bug_movemente\nYour branch and 'origin/no_bug_movemente' have diverged,\nand have 1 and 5 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\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/chat/chat.page.ts\n\tmodified: src/app/pages/chat/group-messages/group-messages.page.ts\n\tmodified: src/app/pages/publications/publications.page.ts\n\tmodified: src/app/pages/publications/view-publications/view-publications.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.ts\n\tmodified: src/app/shared/popover/chat-popover/chat-popover.page.ts\n\tmodified: src/app/shared/publication/view-publications/view-publications.page.ts\n\tmodified: src/environments/environment.prod.ts\n\tmodified: src/environments/environment.ts\n\tmodified: src/theme/variables.scss",
|
||||||
"changeAuthor": "eudes.inacio"
|
"changeAuthor": "eudes.inacio"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user