<commit_before><md-card>
    <md-card-header>
        <md-icon>history</md-icon>
        <md-card-header-text layout="row" layout-align="space-between center">
            <span class="md-headline">
                Istoric client: {{ $ctrl.data.history.length || '0'}} sedinte
                <md-button class="md-icon-button" 
                    ng-click="$ctrl.actions.refreshHistory($event)"
                    ng-if="$ctrl.data.clientId">
                    <md-icon>refresh</md-icon>
                    <md-tooltip>Refresh istoric</md-tooltip>
                </md-button>
            </span>
            <md-menu md-position-mode="target-right target">
                <md-button md-menu-origin ng-click="$mdMenu.open($event)" class="md-primary" button-shrink="gt-sm">
                    <md-icon>add_circle</md-icon>
                    Adauga
                </md-button>
                <md-menu-content>
                    <md-menu-item>
                        <md-button ng-click="$ctrl.actions.addNewHistoryItem($event)">
                            <md-icon>assignment</md-icon>
                            Sedinta noua
                        </md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-disabled="true">
                            <md-icon>alarm_add</md-icon>
                            Programare noua
                        </md-button>
                    </md-menu-item>
                </md-menu-content>
            </md-menu>
        </md-card-header-text>
    </md-card-header>
    <md-card-content class="overflow" scroll-glue>
        <div ng-repeat="historyItem in $ctrl.data.history | orderBy: 'date' track by historyItem._id">
            <md-card current-session="historyItem.date" session-color>
                <md-card-header>
                    <md-card-header-text ng-click="showDetails = !showDetails">
                        <span class="md-title">Sedinta {{ $index + 1 }}</span>
                        <span class="md-subhead">Data: {{ historyItem.date | amDateFormat:'Do/MM/YYYY, h:mm a' }}</span>
                    </md-card-header-text>
                    <md-button ng-click="$ctrl.actions.editHistoryItem($event, historyItem)" button-shrink="gt-sm">
                        <md-icon>edit</md-icon>
                        Editeaza
                    </md-button>
                </md-card-header>
                <md-divider></md-divider>
                <md-card-content ng-show="showDetails || $last">
                    <div ng-repeat="servicesByStaff in historyItem.performedServices track by $index">
                        <div>
                            <div><b>{{ servicesByStaff.staff.first_name + ' ' + servicesByStaff.staff.last_name }}</b>{{servicesByStaff.room.name ? ' in ' + servicesByStaff.room.name: '' }}{{ servicesByStaff.interval ? ', la ' +  servicesByStaff.interval + ' sapt.': ''}}:</div>
                        </div>
                        <ol>
                            <li ng-repeat="service in servicesByStaff.services track by service._id">
                                {{service.name}}
                                <small ng-hide="!service.price && !service.duration">{{service.price}} RON / {{service.duration}} min.</small>
                            </li>
                        </ol>

                        <p ng-show="servicesByStaff.soldProducts">Produse acasa: {{ servicesByStaff.soldProducts }}</p>
                        <p ng-show="servicesByStaff.observations">Observatii: {{ servicesByStaff.observations }}</p>
                        <p ng-show="servicesByStaff.videosTaken">Filmari: {{ servicesByStaff.videosTaken ? 'Da' : 'Nu' }}</p>
                        <p ng-show="servicesByStaff.photosTaken">Poze: {{ servicesByStaff.photosTaken ? 'Da' : 'Nu' }}</p>
                    </div>
                </md-card-content>
            </md-card>
        </div>
    </md-card-content>
</md-card><commit_msg>- added paid status in client history<commit_after><md-card>
    <md-card-header>
        <md-icon>history</md-icon>
        <md-card-header-text layout="row" layout-align="space-between center">
            <span class="md-headline">
                Istoric client: {{ $ctrl.data.history.length || '0'}} sedinte
                <md-button class="md-icon-button" 
                    ng-click="$ctrl.actions.refreshHistory($event)"
                    ng-if="$ctrl.data.clientId">
                    <md-icon>refresh</md-icon>
                    <md-tooltip>Refresh istoric</md-tooltip>
                </md-button>
            </span>
            <md-menu md-position-mode="target-right target">
                <md-button md-menu-origin ng-click="$mdMenu.open($event)" class="md-primary" button-shrink="gt-sm">
                    <md-icon>add_circle</md-icon>
                    Adauga
                </md-button>
                <md-menu-content>
                    <md-menu-item>
                        <md-button ng-click="$ctrl.actions.addNewHistoryItem($event)">
                            <md-icon>assignment</md-icon>
                            Sedinta noua
                        </md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-disabled="true">
                            <md-icon>alarm_add</md-icon>
                            Programare noua
                        </md-button>
                    </md-menu-item>
                </md-menu-content>
            </md-menu>
        </md-card-header-text>
    </md-card-header>
    <md-card-content class="overflow" scroll-glue>
        <div ng-repeat="historyItem in $ctrl.data.history | orderBy: 'date' track by historyItem._id">
            <md-card current-session="historyItem.date" session-color>
                <md-card-header>
                    <md-card-header-text ng-click="showDetails = !showDetails">
                        <span class="md-title">Sedinta {{ $index + 1 }}</span>
                        <span class="md-subhead">Data: {{ historyItem.date | amDateFormat:'Do/MM/YYYY, h:mm a' }}</span>
                    </md-card-header-text>
                    <md-button ng-click="$ctrl.actions.editHistoryItem($event, historyItem)" button-shrink="gt-sm">
                        <md-icon>edit</md-icon>
                        Editeaza
                    </md-button>
                </md-card-header>
                <md-divider></md-divider>
                <md-card-content ng-show="showDetails || $last">
                    <div ng-repeat="servicesByStaff in historyItem.performedServices track by $index">
                        <div>
                            <div><b>{{ servicesByStaff.staff.first_name + ' ' + servicesByStaff.staff.last_name }}</b>{{servicesByStaff.room.name ? ' in ' + servicesByStaff.room.name: '' }}{{ servicesByStaff.interval ? ', la ' +  servicesByStaff.interval + ' sapt.': ''}}:</div>
                        </div>
                        <ol>
                            <li ng-repeat="service in servicesByStaff.services track by service._id">
                                {{service.name}}
                                <small ng-hide="!service.price && !service.duration">{{service.price}} RON / {{service.duration}} min.</small>
                            </li>
                        </ol>

                        <p ng-show="servicesByStaff.soldProducts">Produse acasa: {{ servicesByStaff.soldProducts }}</p>
                        <p ng-show="servicesByStaff.observations">Observatii: {{ servicesByStaff.observations }}</p>
                        <p ng-show="servicesByStaff.videosTaken">Filmari: {{ servicesByStaff.videosTaken ? 'Da' : 'Nu' }}</p>
                        <p ng-show="servicesByStaff.photosTaken">Poze: {{ servicesByStaff.photosTaken ? 'Da' : 'Nu' }}</p>
                    </div>
                    <div layout="row" layout-align="start center">
                        <div flex>
                            <md-button
                                ng-class="{'md-primary': historyItem.payment.total === historyItem.payment.paidAmount}"
                                ng-click="showPaymentStatus = !showPaymentStatus">
                                <md-icon>account_balance_wallet</md-icon>
                                <span ng-show="showPaymentStatus">Platit: {{ historyItem.payment.total === historyItem.payment.paidAmount ? 'Da': 'Nu'}}</span>
                            </md-button>
                        </div>
                        <div layout="row" ng-show="showPaymentStatus">

                            <div flex layout="column" layout-align="start end">
                                <div ng-show="historyItem.payment.total === historyItem.payment.paidAmount" 
                                    ng-repeat="payment in historyItem.payment.paidAmounts track by $index">
                                    {{ payment.type.name }}: {{ payment.total + 'RON' }}
                                </div>
                                <div>Total: {{historyItem.payment.total}}RON</div>
                            </div>
                        </div>
                    </div>
                    

                </md-card-content>
            </md-card>
        </div>
    </md-card-content>
</md-card>
{'fraction_non_alphanumeric': 0.1408300437426651, 'fraction_numerical': 0.0004267577083111064, 'mean_word_length': 1.3231722428748451, 'pattern_counts': {'":': 0, '<': 181, '<?xml version=': 0, '>': 181, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4226760', 'n_tokens_mistral': 2628, 'n_tokens_neox': 2446, 'n_words': 378}