<commit_before>﻿@using WebMatrix.Data;
@{
    var p = LcData.UserInfo.GetRequestedUserRow();
    var pos = PageData["position"];
    
    var dataCats = LcData.GetServiceCatsAndItsAttributes(pos.PositionID, "provider-services", pos.UserID);
    
    // TODO: Get Customer Type Id   
    var clienttypeid = PageData["ClientTypeID"] = 1;
    
    dynamic customer = PageData["Customer"];
        
    var providerPrice = LcData.GetProviderPrice(p.UserID, pos.PositionID, clienttypeid, (customer == null ? 0 : customer.UserID));
    
    dynamic cancellationPolicy = null;
    using (var db = Database.Open("sqlloco")){
        cancellationPolicy = LcData.Booking.GetProviderCancellationPolicy(
            p.UserID,
            pos.PositionID,
            db);
    }
    
    var prefix = "profile-position-" + pos.PositionID;
}
@helper printAttList(dynamic cat){
    <ul class="attributes-list">
        @foreach (var att in cat["ServiceAttributes"]) {
            if (att["UserChecked"]) {
            <li title="@att["ServiceAttribute"]" data-description="@att["ServiceAttributeDescription"]">@att["ServiceAttribute"]</li>
            }
        }
    </ul>
}
@helper printAttListLangs(dynamic cat, dynamic levelsCat){
    var selected = levelsCat["UserSelectedLevels"];
    var levelsIndex = levelsCat["LevelsIndex"];
    <ul class="attributes-list">
        @foreach (var att in cat["ServiceAttributes"]) {
            if (att["UserChecked"]) {
                string levelStr = null;
                if (selected.ContainsKey(att["ServiceAttributeID"])) {
                    var levelId = selected[att["ServiceAttributeID"]];
                    levelStr = levelsCat["ServiceAttributes"][levelsIndex[levelId]]["ServiceAttribute"];
                }
                <li title="@att["ServiceAttribute"]" data-description="@att["ServiceAttributeDescription"]">@att["ServiceAttribute"] @(levelStr == null ? "" : "(" + levelStr + ")")</li>
            }
        }
    </ul>
}
@helper printCatTitle(dynamic cat){
    <h5 title="@cat["ServiceAttributeCategoryName"]" data-description="@cat["ServiceAttributeCategoryDescription"]">
        @cat["ServiceAttributeCategoryName"]
    </h5>
}
            <div class="position-summary">
                <div class="actions book">
                    <a class="book-action main-action" href="@Href(LcUrl.LangPath + "Booking/?providerid=" + p.UserID + "&positionid=" + pos.PositionID)">Book now</a>
                </div>
                <span class="hour-price">
                        @if (providerPrice.IsHourly)
                        {
                            <span class="price">@String.Format("{0:C}", providerPrice.Price)</span> <text>/h</text>
                        }
                        else
                        {
                            <span class="price-since">from:</span> <span class="price">@String.Format("{0:C}", providerPrice.Price)</span>
                        }<commit_msg>Removed unneeded tooltips on profile service-attributes, they doesn't includes the data to show tooltips when no description anymore. #257<commit_after>﻿@using WebMatrix.Data;
@{
    var p = LcData.UserInfo.GetRequestedUserRow();
    var pos = PageData["position"];
    
    var dataCats = LcData.GetServiceCatsAndItsAttributes(pos.PositionID, "provider-services", pos.UserID);
    
    // TODO: Get Customer Type Id   
    var clienttypeid = PageData["ClientTypeID"] = 1;
    
    dynamic customer = PageData["Customer"];
        
    var providerPrice = LcData.GetProviderPrice(p.UserID, pos.PositionID, clienttypeid, (customer == null ? 0 : customer.UserID));
    
    dynamic cancellationPolicy = null;
    using (var db = Database.Open("sqlloco")){
        cancellationPolicy = LcData.Booking.GetProviderCancellationPolicy(
            p.UserID,
            pos.PositionID,
            db);
    }
    
    var prefix = "profile-position-" + pos.PositionID;
}
@helper printAttList(dynamic cat){
    <ul class="attributes-list">
        @foreach (var att in cat["ServiceAttributes"]) {
            if (att["UserChecked"]) {
                string title, desc;
                desc = att["ServiceAttributeDescription"];
                if (String.IsNullOrWhiteSpace(desc)) {
                    desc = title = "";
                } else {
                    title = att["ServiceAttribute"];
                }
                <li title="@title" data-description="@desc">@att["ServiceAttribute"]</li>
            }
        }
    </ul>
}
@helper printAttListLangs(dynamic cat, dynamic levelsCat){
    var selected = levelsCat["UserSelectedLevels"];
    var levelsIndex = levelsCat["LevelsIndex"];
    <ul class="attributes-list">
        @foreach (var att in cat["ServiceAttributes"]) {
            if (att["UserChecked"]) {
                string levelStr = null;
                if (selected.ContainsKey(att["ServiceAttributeID"])) {
                    var levelId = selected[att["ServiceAttributeID"]];
                    levelStr = levelsCat["ServiceAttributes"][levelsIndex[levelId]]["ServiceAttribute"];
                }
                string title, desc;
                desc = att["ServiceAttributeDescription"];
                if (String.IsNullOrWhiteSpace(desc)) {
                    desc = title = "";
                } else {
                    title = att["ServiceAttribute"];
                }
                <li title="@title" data-description="@desc">@att["ServiceAttribute"] @(levelStr == null ? "" : "(" + levelStr + ")")</li>
            }
        }
    </ul>
}
@helper printCatTitle(dynamic cat){
    string title, desc;
    desc = cat["ServiceAttributeCategoryDescription"];
    if (String.IsNullOrWhiteSpace(desc)) {
        desc = title = "";
    } else {
        title = cat["ServiceAttributeCategoryName"];
    }
    <h5 title="@title" data-description="@desc">
        @cat["ServiceAttributeCategoryName"]
    </h5>
}
            <div class="position-summary">
                <div class="actions book">
                    <a class="book-action main-action" href="@Href(LcUrl.LangPath + "Booking/?providerid=" + p.UserID + "&positionid=" + pos.PositionID)">Book now</a>
                </div>
                <span class="hour-price">
                        @if (providerPrice.IsHourly)
                        {
                            <span class="price">@String.Format("{0:C}", providerPrice.Price)</span> <text>/h</text>
                        }
                        else
                        {
                            <span class="price-since">from:</span> <span class="price">@String.Format("{0:C}", providerPrice.Price)</span>
                        }
{'fraction_non_alphanumeric': 0.1370048019207683, 'fraction_numerical': 0.0022509003601440575, 'mean_word_length': 2.1159420289855073, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6427386', 'n_tokens_mistral': 1822, 'n_tokens_neox': 1746, 'n_words': 336}