eHealthAfrica/direct-delivery-dashboard

View on GitHub
couchdb/app/deliveries/_design/dashboard-delivery-rounds/views/alert-receivers/map.js

Summary

Maintainability
A
0 mins
Test Coverage
function (doc) {
    if(doc.doc_type === 'alert-receiver'){
        var locId;
        if(doc.locations.indexOf('ALL') > -1 ){
            emit(null,doc)
            return;
        }
        for(var i in doc.locations){
            locId = doc.locations[i]
            emit(locId, doc)
        }

    }
}