ArticlesStoreBase<S extends ArticlesServiceAbstract , Q extends QueueServiceAbstract , P extends ArticleServiceClient , CH extends SessionContext > class
abstract
Mixed-in types
Implementers
Constructors
ArticlesStoreBase (S _articlesService , Q _queueService , P _articleStub , CH _gatekeeper )
Methods
addArticleWInSelected (ArticleWMinQt articleMinQt )
→ void
BASKETS
when making a basket
clearAllArticleMinQtInSelected ()
→ void
clearSearch ()
→ Future <void >
createAllCalibre (List <CalibreWeebi<ArticleRawAbstract > > data )
→ Future <int >
createArticleRetail <A extends ArticleRawAbstract > (A articleData )
→ Future <A >
in cloud mode, internet must available
createCalibrateArticle <A extends ArticleRawAbstract > (CalibreWeebi<A > data )
→ Future <CalibreWeebi<ArticleRawAbstract > >
if gatekeeperIsLinked then connectivity was already checked in the view
if sending data goes wrong we do not persist in queue but stop the action
createCategory (CategoryWeebi data )
→ Future <CategoryWeebi >
deleteAllArticlesAndPhotosAndCalibresAndCategories ({required String localPhotoFolderPath })
→ Future <bool >
name is rather long but at least you have been warned
deleteArticleForever <A extends ArticleRawAbstract > (A articleData )
→ Future <ObservableList <CalibreWeebi<ArticleRawAbstract > > >
deleteArticlePhotos ({required String localPhotoFolderPath })
→ Future <bool >
deleteCalibreForever (CalibreWeebi<ArticleRawAbstract > calibreData )
→ Future <ObservableList <CalibreWeebi<ArticleRawAbstract > > >
deleteCategory (CategoryWeebi data )
→ Future <bool >
deletePhoto (ArticlePhoto data , {bool isLocalFileToBeDeleted = false , bool isInternetAvailable = true })
→ Future <bool >
handles both sides (memory service and mobx obs photos) + server
findAndAddInSelectedSingleArticleBasedOnFullName (String fullName )
→ bool
when making a basket
init ({List <CalibreWeebi<ArticleRawAbstract > > ? data , List <ArticlePhoto > ? photosData })
→ Future <bool >
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeArticleMinQtInSelected (ArticleWMinQt article )
→ void
when making a basket
searchByTitleOrIdorSku ()
→ void
setArticleStub (P articleServiceClient )
→ void
setQueryString (String val )
→ void
setSearchedBy (SearchedBy val )
→ void
sortBy (SortedBy sortBy )
→ ObservableList <CalibreWeebi<ArticleRawAbstract > >
toString ()
→ String
A string representation of this object.
inherited
updateArticle <A extends ArticleRawAbstract > (A articleData , {bool isInternetAvailable = true })
→ Future <A >
updateArticleMinQtInSelected (ArticleWMinQt article , num minQt )
→ void
updateCalibre <A extends ArticleRawAbstract > (CalibreWeebi<A > data , {bool isInternetAvailable = true })
→ Future <CalibreWeebi<A > >
if cloud we will try to send the data
but if action fail we do not block and persist it in the queue to synced later
updateCategory (CategoryWeebi data )
→ Future <CategoryWeebi >
upsertCalibresBasedOnId (List <CalibreWeebi<ArticleRawAbstract > > articlesInTheBush )
→ Future <int >
during the file import (csv, excel json)
? maybe should be used for downloading data from server
upsertPhoto (ArticlePhoto data , {bool isInternetAvailable = true })
→ Future <ArticlePhoto >
when a photo is upsert, automatically the article is updated,
this sparks a calibre sync or add the calibreId in offline queue
we delete and create photo, bit more costly but much much more simple
for calibrePhoto use article.id = 0