pub fn replace_sku_name(
    line_count: usize,
    rrc: &mut RootRenderingComponent,
    vdom_weak: dodrio::VdomWeak,
    field_value: String,
) {
    //prepare a request and call json.
    //at the end replace the product-nameX
    let placeholder = format!("product--name{}", line_count);
    rrc.reqbody = rrc.reqbody.replace("product-name", placeholder.as_str());

    let mut reqbody = format!(
        r#"{{
                        "api_uid":"{}",
                        "api_key":"{}",
                        "#,
        rrc.api_uid, rrc.api_key
    );

    reqbody.push_str(
        format!(
            r#"
                        "filtro": "",
                        "id": "",
                        "nome": "",
                        "cod": "{}",
                        "desc": "",
                        "categoria": "",
                        "pagina": 1
                        }}"#,
            field_value
        )
        .as_str(),
    );
    log1(format!("sku {} req {}", field_value, reqbody).as_str());

    let webrequest =
        reqbodymod::create_webrequest(reqbody, "https://bestia.dev/v1/prodotti/lista".to_string());
    fetchmod::fetch_response(
        vdom_weak,
        &webrequest,
        placeholder,
        &rootrenderingmod::replace_product_name,
    );
}
///replace sku name and find product-name from webservice
replace sku name and find product-name from webservice
replace sku name and find product - name from webservice
pub fn replace_sku_name(
    line_count: usize,
    rrc: &mut RootRenderingComponent,
    vdom_weak: dodrio::VdomWeak,
    field_value: String,
) {
    //prepare a request and call json.
    //at the end replace the product-nameX
    let placeholder = format!("product--name{}", line_count);
    rrc.reqbody = rrc.reqbody.replace("product-name", placeholder.as_str());
    let mut reqbody = format!(
        r#"{{
                        "api_uid":"{}",
                        "api_key":"{}",
                        "#,
        rrc.api_uid, rrc.api_key
    );
    reqbody.push_str(
        format!(
            r#"
                        "filtro": "",
                        "id": "",
                        "nome": "",
                        "cod": "{}",
                        "desc": "",
                        "categoria": "",
                        "pagina": 1
                        }}"#,
            field_value
        )
        .as_str(),
    );
    log1(format!("sku {} req {}", field_value, reqbody).as_str());
    let webrequest =
        reqbodymod::create_webrequest(reqbody, "https://bestia.dev/v1/prodotti/lista".to_string());
    fetchmod::fetch_response(
        vdom_weak,
        &webrequest,
        placeholder,
        &rootrenderingmod::replace_product_name,
    );
}
pub fn replace_sku_name ( line_count : usize , rrc : & mut RootRenderingComponent , vdom_weak : dodrio :: VdomWeak , field_value : String , ) { //prepare a request and call json. //at the end replace the product-nameX let placeholder = format ! ( " " line_count ) ; rrc . reqbody = rrc . reqbody . replace ( " " , placeholder . as_str ( ) ) ; let mut reqbody = format ! ( r#"{{
                        "api_uid":"{}",
                        "api_key":"{}",
                        "# rrc api_uid rrc api_key ) ; reqbody . push_str ( format ! ( r#"
                        "filtro": "",
                        "id": "",
                        "nome": "",
                        "cod": "{}",
                        "desc": "",
                        "categoria": "",
                        "pagina": 1
                        }}"# field_value ) . as_str ( ) , ) ; log1 ( format ! ( " " field_value reqbody ) . as_str ( ) ) ; let webrequest = reqbodymod :: create_webrequest ( reqbody , " " . to_string ( ) ) ; fetchmod :: fetch_response ( vdom_weak , & webrequest , placeholder , & rootrenderingmod :: replace_product_name , ) ; }
replace sku name and find product-name from webservice
replace sku name and find product - name from webservice
line_count
usize
rrc
&mut RootRenderingComponent
vdom_weak
dodrio::VdomWeak
field_value
String