fix: Change status=Completed as observers rule instead of Published
This commit is contained in:
@@ -124,7 +124,7 @@ async function findList( user_type, email, query ) {
|
||||
const { page, elements } = getPagination( query );
|
||||
const andFilterList = getAndFilterList( query ) || [];
|
||||
|
||||
andFilterList.push({ "status": "Published" }); // Only when the publication is not in draft or completed.
|
||||
andFilterList.push({ "status": "Completed" }); // Only when the publication is connected to a carrier.
|
||||
andFilterList.push({ "bidder": { "$ne":null } }); // Only when published have a proposal accepted.
|
||||
|
||||
if( user_type == "client" ){
|
||||
|
||||
@@ -71,7 +71,7 @@ const schema = new Schema({
|
||||
// 3. Enroute Shipments (In Transit)
|
||||
// 4. Shipments in Unloading (Unloading)
|
||||
// 5. Shipments pending finding truck
|
||||
status: { type: String, default: 'Draft', enum: ['Draft', 'Published', 'Completed', 'Closed'] },
|
||||
status: { type: String, default: 'Draft', enum: ['Draft', 'Published', 'Completed', 'Closed'] },//When completed => Publication is done, awaiting for the load transit to finish (load_status set tot Delivered).
|
||||
load_status: { type: String, enum: ['Published', 'Loading', 'Transit', 'Downloading', 'Delivered'] },
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user