Untitled

mail@pastecode.io avatar
unknown
jsx
4 years ago
812 B
5
Indexable
Never
				function maping(notifications,currentIds, verification){
					if(notifications.offersList.length > 0){
						verification(notifications,currentIds());
					}else{

						console.log('STOP REQUEST');
						notifications.actionStart.viewElement.offVail();
					}
				}

				maping(this,function(){

					let currentIds = [];

					response.workOpportunities.forEach((v,i) => {
						currentIds.push(v.id);
					});	

					return currentIds;

				},
					function(notifications,currentIds){

						notifications.offersList.forEach((v,i) => {


							if(!currentIds.includes(v)){

								notifications.offersList.splice(i, 1);

								$('#' + v).closest('.tour-listing__card').remove(); 

								console.log('delete');
								console.log(notifications.offersList.length);

							}

						});

					}
				);